usb: phy: am335x-control: check return value of bus_find_device
authorDavid Dueck <davidcdueck@googlemail.com>
Sun, 8 Feb 2015 15:29:30 +0000 (16:29 +0100)
committerFelipe Balbi <balbi@ti.com>
Tue, 10 Mar 2015 21:28:44 +0000 (16:28 -0500)
commitd0f347d62814ec0f599a05c61c5619d5e999e4ae
treef90e46fd64c0f1419d6ead467cf59b18171aaeee
parent509d612b2fc4b66a58f1af762ac69829ed11c0ce
usb: phy: am335x-control: check return value of bus_find_device

This fixes a potential null pointer dereference.

Cc: <stable@vger.kernel.org> # v3.16+
Fixes: d4332013919a ("driver core: dev_get_drvdata: Don't check for NULL dev")
Acked-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
Signed-off-by: David Dueck <davidcdueck@googlemail.com>
Signed-off-by: Felipe Balbi <balbi@ti.com>
drivers/usb/phy/phy-am335x-control.c