staging/ft1000: Return -ENOMEM if kmalloc fails at ft1000_probe

If the kmalloc fails return -ENOMEM , returning 0 is not the proper
way if any function fails

Signed-off-by: Devendra Naga <devendra.aaru@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:
Devendra Naga 2012-06-19 18:15:25 +05:30 committed by Greg Kroah-Hartman
parent 86c948b441
commit b10c0b92ca
1 changed files with 1 additions and 1 deletions

View File

@ -71,7 +71,7 @@ static int ft1000_probe(struct usb_interface *interface,
if (!ft1000dev) {
printk(KERN_ERR "out of memory allocating device structure\n");
return 0;
return -ENOMEM;
}
memset(ft1000dev, 0, sizeof(*ft1000dev));