USB: gadget: prevent unnecessary warning message
The USB gadget autostart code issues a warning when no otg device
exists:

Cannot set parameter otg.mode: No such device

This is unnecessary since there may be no otg device at all, but only a
gadget device. Drop that warning by checking if there is a otg device
first.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
1 parent 6d2f0fc commit 052415dde84ec9091396cde68bc18bb350473dc2
@Sascha Hauer Sascha Hauer authored on 26 Oct 2018
Showing 1 changed file
View
drivers/usb/gadget/autostart.c