Skip to contentSkip to conversation

USB: r8a66597-udc: return -ENOMEM if kzalloc() fails

PATCH New Axel Lin 1 participant 1 message Aug 17, 2010 USB

lore
Share & tools
lore

Axel Lin

author
#0 lore raw

PATCH 1/1 USB: r8a66597-udc: return -ENOMEM if kzalloc() fails

---
 drivers/usb/gadget/r8a66597-udc.c |    1 +
 1 files changed, 1 insertions(+), 0 deletions(-)
drivers/usb/gadget/r8a66597-udc.c +1 -0
index 70a8178..2456ccd 100644
@@ -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;
 	}
Signature · 1 line
1.7.2