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:
parent
86c948b441
commit
b10c0b92ca
|
@ -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));
|
||||
|
|
Loading…
Reference in New Issue