Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

staging: pi433: Remove unnecessary variable

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>

authored by

Nishka Dasgupta and committed by
Greg Kroah-Hartman
48c80ccc dcb76ad1

+2 -3
+2 -3
drivers/staging/pi433/pi433_if.c
··· 871 871 static long 872 872 pi433_ioctl(struct file *filp, unsigned int cmd, unsigned long arg) 873 873 { 874 - int retval = 0; 875 874 struct pi433_instance *instance; 876 875 struct pi433_device *device; 877 876 struct pi433_tx_cfg tx_cfg; ··· 922 923 mutex_unlock(&device->rx_lock); 923 924 break; 924 925 default: 925 - retval = -EINVAL; 926 + return -EINVAL; 926 927 } 927 928 928 - return retval; 929 + return 0; 929 930 } 930 931 931 932 #ifdef CONFIG_COMPAT