staging/gdm72xx: return PTR_ERR rather -ENOENT
authorDevendra Naga <devendra.aaru@gmail.com>
Thu, 12 Jul 2012 06:11:11 +0000 (11:56 +0545)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Tue, 17 Jul 2012 01:53:47 +0000 (18:53 -0700)
return the error of filp_open rather returning -ENOENT.

Signed-off-by: Devendra Naga <devendra.aaru@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/staging/gdm72xx/usb_boot.c

index c163bcc437ed793158380be6d37d90b7552e937f..fef290c38db67ae8620a8ff92179275fb564730b 100644 (file)
@@ -174,7 +174,7 @@ int usb_boot(struct usb_device *usbdev, u16 pid)
        if (IS_ERR(filp)) {
                printk(KERN_ERR "Can't find %s.\n", img_name);
                set_fs(fs);
-               ret = -ENOENT;
+               ret = PTR_ERR(filp);
                goto restore_fs;
        }