• Aaro Koskinen's avatar
    usb: phy: isp1301-omap: fix smatch warnings · 8b42a746
    Aaro Koskinen authored
    phy-isp1301-omap produces the following smatch warnings:
    
    drivers/usb/phy/phy-isp1301-omap.c:1280 isp1301_set_host() warn: variable dereferenced before check 'otg' (see line 1278)
    drivers/usb/phy/phy-isp1301-omap.c:1336 isp1301_set_peripheral() warn: variable dereferenced before check 'otg' (see line 1334)
    drivers/usb/phy/phy-isp1301-omap.c:1417 isp1301_start_srp() warn: variable dereferenced before check 'otg' (see line 1414)
    drivers/usb/phy/phy-isp1301-omap.c:1445 isp1301_start_hnp() warn: variable dereferenced before check 'otg' (see line 1442)
    
    Fix by deleting bogus NULL pointer checks. The USB framework will always
    call us with a valid OTG pointer.
    Signed-off-by: default avatarAaro Koskinen <aaro.koskinen@iki.fi>
    Signed-off-by: default avatarFelipe Balbi <balbi@ti.com>
    8b42a746
phy-isp1301-omap.c 40.1 KB