]> git.baikalelectronics.ru Git - kernel.git/commit
usb: phy: tahvo: fix smatch warnings
authorAaro Koskinen <aaro.koskinen@iki.fi>
Sat, 21 Dec 2013 18:37:36 +0000 (20:37 +0200)
committerFelipe Balbi <balbi@ti.com>
Mon, 23 Dec 2013 16:14:33 +0000 (10:14 -0600)
commite6c010a7ab0660da93b9dc4f0cf0d0155745cb97
tree2e71c4f5c92e183fa6296405d0c997aa433c5d10
parent810f44002c20a414d258468d7c45a0c89be097ab
usb: phy: tahvo: fix smatch warnings

phy-tahvo introduced the following smatch warnings:

drivers/usb/phy/phy-tahvo.c:203 tahvo_usb_set_host() warn: variable dereferenced before check 'otg' (see line 199)
drivers/usb/phy/phy-tahvo.c:235 tahvo_usb_set_peripheral() warn: variable dereferenced before check 'otg' (see line 231)

Fix by deleting bogus NULL pointer checks. The USB framework will always
call us with a valid OTG pointer.

Reported-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Aaro Koskinen <aaro.koskinen@iki.fi>
Signed-off-by: Felipe Balbi <balbi@ti.com>
drivers/usb/phy/phy-tahvo.c