projects
/
openwrt
/
staging
/
blogic.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
cd10869
)
usb: phy: don't return with NULL from devm_usb_get_phy()
author
Gabor Juhos
<
[email protected]
>
Fri, 11 Oct 2013 07:01:03 +0000
(09:01 +0200)
committer
Felipe Balbi
<
[email protected]
>
Fri, 11 Oct 2013 18:50:38 +0000
(13:50 -0500)
The callers are expecting an ERR_PTR value in case
of an error. Change he code to return with an encoded
-ENOMEM value in the case of a failed devres_alloc call.
Signed-off-by: Gabor Juhos <
[email protected]
>
Signed-off-by: Felipe Balbi <
[email protected]
>
drivers/usb/phy/phy.c
patch
|
blob
|
history
diff --git
a/drivers/usb/phy/phy.c
b/drivers/usb/phy/phy.c
index a9984c700d2c428fd2e771a1d175c12009f94475..1b74523e1fee5640bad21035b171ef9cf2c5289b 100644
(file)
--- a/
drivers/usb/phy/phy.c
+++ b/
drivers/usb/phy/phy.c
@@
-98,7
+98,7
@@
struct usb_phy *devm_usb_get_phy(struct device *dev, enum usb_phy_type type)
ptr = devres_alloc(devm_usb_phy_release, sizeof(*ptr), GFP_KERNEL);
if (!ptr)
- return
NULL
;
+ return
ERR_PTR(-ENOMEM)
;
phy = usb_get_phy(type);
if (!IS_ERR(phy)) {