summaryrefslogtreecommitdiffstats
path: root/drivers/usb/gadget/r8a66597-udc.c
diff options
context:
space:
mode:
authorAxel Lin <axel.lin@gmail.com>2010-08-17 09:41:29 +0800
committerGreg Kroah-Hartman <gregkh@suse.de>2010-08-23 20:50:15 -0700
commit96f2a34d2cec71d59014be9ecd7a038435e88584 (patch)
tree12a030b3379f9b34a1df52fbff50ff64fdbfffc9 /drivers/usb/gadget/r8a66597-udc.c
parent0827a9ff2bbcbb03c33f1a6eb283fe051059482c (diff)
USB: r8a66597-udc: return -ENOMEM if kzalloc() fails
Signed-off-by: Axel Lin <axel.lin@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Diffstat (limited to 'drivers/usb/gadget/r8a66597-udc.c')
-rw-r--r--drivers/usb/gadget/r8a66597-udc.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/drivers/usb/gadget/r8a66597-udc.c b/drivers/usb/gadget/r8a66597-udc.c
index 70a81784275..2456ccd9965 100644
--- a/drivers/usb/gadget/r8a66597-udc.c
+++ b/drivers/usb/gadget/r8a66597-udc.c
@@ -1557,6 +1557,7 @@ static int __init r8a66597_probe(struct platform_device *pdev)
/* initialize ucd */
r8a66597 = kzalloc(sizeof(struct r8a66597), GFP_KERNEL);
if (r8a66597 == NULL) {
+ ret = -ENOMEM;
printk(KERN_ERR "kzalloc error\n");
goto clean_up;
}