OSDN Git Service

staging: pi433: Remove unnecessary variable
authorNishka Dasgupta <nishkadg.linux@gmail.com>
Thu, 23 May 2019 12:53:41 +0000 (18:23 +0530)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 24 May 2019 07:00:44 +0000 (09:00 +0200)
The variable retval is assigned constant values twice, and can therefore
be replaced by its values.

Signed-off-by: Nishka Dasgupta <nishkadg.linux@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/staging/pi433/pi433_if.c

index c889f0b..40c6f4e 100644 (file)
@@ -871,7 +871,6 @@ abort:
 static long
 pi433_ioctl(struct file *filp, unsigned int cmd, unsigned long arg)
 {
-       int                     retval = 0;
        struct pi433_instance   *instance;
        struct pi433_device     *device;
        struct pi433_tx_cfg     tx_cfg;
@@ -923,10 +922,10 @@ pi433_ioctl(struct file *filp, unsigned int cmd, unsigned long arg)
                mutex_unlock(&device->rx_lock);
                break;
        default:
-               retval = -EINVAL;
+               return -EINVAL;
        }
 
-       return retval;
+       return 0;
 }
 
 #ifdef CONFIG_COMPAT