aboutsummaryrefslogtreecommitdiff
path: root/drivers/usb
diff options
context:
space:
mode:
authorvirupaxs <virupax.sadashivpetimath@stericsson.com>2010-03-15 13:55:24 +0530
committerJohn Rigby <john.rigby@linaro.org>2010-09-02 22:44:40 -0600
commitc1d510da775becd22e13a527106aef4acb201e90 (patch)
tree22cd2d7ada601236d0e8d64830b2344377ba2f56 /drivers/usb
parent6d5f937af6128496bd19725f9e38926373c3ddba (diff)
coverity fixes 18th march
Signed-off-by: virupaxs <virupax.sadashivpetimath@stericsson.com>
Diffstat (limited to 'drivers/usb')
-rw-r--r--drivers/usb/musb/stm_musb.c26
1 files changed, 23 insertions, 3 deletions
diff --git a/drivers/usb/musb/stm_musb.c b/drivers/usb/musb/stm_musb.c
index 2ec68b9f949..fffd0d58fea 100644
--- a/drivers/usb/musb/stm_musb.c
+++ b/drivers/usb/musb/stm_musb.c
@@ -427,7 +427,14 @@ int __init musb_platform_init(struct musb *musb)
val = ab8500_read(AB8500_INTERRUPT, AB8500_IT_MASK20_REG);
ab8500_write(AB8500_INTERRUPT, AB8500_IT_MASK20_REG, AB8500_IT_MASK20_MASK);
val = ab8500_read(AB8500_INTERRUPT, AB8500_IT_MASK20_REG);
- ab8500_set_callback_handler(AB8500_ID_WAKEUP, usb_host_detect_handler, NULL);
+ ret = ab8500_set_callback_handler(AB8500_ID_WAKEUP,
+ usb_host_detect_handler, NULL);
+ if (ret < 0) {
+ printk(KERN_ERR "failed to set callback handler"
+ " for usb host detection\n");
+ return ret;
+ }
+
} else {
#ifndef CONFIG_USB_SERIAL
val = ab8500_read(AB8500_REGU_CTRL1, AB8500_REGU_OTGSUPPLY_CTRL_REG);
@@ -438,8 +445,21 @@ int __init musb_platform_init(struct musb *musb)
#else
if ((ab8500_rev == AB8500_REV_10) || (ab8500_rev == AB8500_REV_11)) {
ab8500_write(AB8500_INTERRUPT, AB8500_IT_MASK2_REG, AB8500_IT_MASK2_MASK);
- ab8500_set_callback_handler(AB8500_VBUS_RISING, usb_device_detect_handler, NULL);
- ab8500_set_callback_handler(AB8500_VBUS_FALLING, usb_device_remove_handler, NULL);
+ ret = ab8500_set_callback_handler(AB8500_VBUS_RISING,
+ usb_device_detect_handler, NULL);
+ if (ret < 0) {
+ printk(KERN_ERR "failed to set callback handler"
+ " for usb device detection\n");
+ return ret;
+ }
+ ret = ab8500_set_callback_handler(AB8500_VBUS_FALLING,
+ usb_device_remove_handler, NULL);
+ if (ret < 0) {
+ printk(KERN_ERR "failed to set the callback"
+ " handler for usb device"
+ " removal\n");
+ return ret;
+ }
}
#endif