diff options
author | Devendra Naga <devendra.aaru@gmail.com> | 2012-06-19 18:15:25 +0530 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2012-06-20 16:07:07 -0700 |
commit | b10c0b92caf97e0d7f1d76996f73bf07a719aa3e (patch) | |
tree | 552d5d2ad300d74d92680da592d6bc29e0879196 /drivers/staging/ft1000/ft1000-usb | |
parent | 86c948b4416b4c2c064d6c7e15476afbc04e2bf5 (diff) |
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>
Diffstat (limited to 'drivers/staging/ft1000/ft1000-usb')
-rw-r--r-- | drivers/staging/ft1000/ft1000-usb/ft1000_usb.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/staging/ft1000/ft1000-usb/ft1000_usb.c b/drivers/staging/ft1000/ft1000-usb/ft1000_usb.c index 84c38d5c9397..a07c504eb029 100644 --- a/drivers/staging/ft1000/ft1000-usb/ft1000_usb.c +++ b/drivers/staging/ft1000/ft1000-usb/ft1000_usb.c @@ -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)); |