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>
This commit is contained in:
Axel Lin 2010-08-17 09:41:29 +08:00 committed by Greg Kroah-Hartman
parent 0827a9ff2b
commit 96f2a34d2c
1 changed files with 1 additions and 0 deletions

View File

@ -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;
}