usb: phy: return an error in usb_get_phy() if try_module_get() fails
authorMathias Krause <minipli@googlemail.com>
Tue, 15 Apr 2014 05:58:15 +0000 (07:58 +0200)
committerFelipe Balbi <balbi@ti.com>
Wed, 16 Apr 2014 15:11:47 +0000 (10:11 -0500)
commit9dc9cb0c9ad0f999e29ce4c4f307cd2abbe752d3
treed5a2035c66129022df6981e1e1d1b67f3400cd1d
parentae8dd0cc4146740e24ffb2092530c47e838001c5
usb: phy: return an error in usb_get_phy() if try_module_get() fails

In case we found a matching USB PHY in usb_get_phy() but the call to
try_module_get() fails, we shouldn't return a (probably soon dangling)
pointer but an ERR_PTR instead.

Signed-off-by: Mathias Krause <minipli@googlemail.com>
Signed-off-by: Felipe Balbi <balbi@ti.com>
drivers/usb/phy/phy.c