Commit b10c0b92 authored by Devendra Naga's avatar Devendra Naga Committed by Greg Kroah-Hartman

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: default avatarDevendra Naga <devendra.aaru@gmail.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent 86c948b4
......@@ -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));
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment