Skip to content

Commit

Permalink
USB: r8a66597-udc: return -ENOMEM if kzalloc() fails
Browse files Browse the repository at this point in the history
Signed-off-by: Axel Lin <axel.lin@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
  • Loading branch information
Axel Lin authored and Greg Kroah-Hartman committed Aug 24, 2010
1 parent 0827a9f commit 96f2a34
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions drivers/usb/gadget/r8a66597-udc.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
Expand Down

0 comments on commit 96f2a34

Please sign in to comment.