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

staging: iio: accel: Remove unnecessary else after goto in if block

This patch removes the unnecessary else following an if block with a
goto statement.

Signed-off-by: Janani Ravichandran <janani.rvchndrn@gmail.com>
Acked-by: Daniel Baluta <daniel.baluta@intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

authored by

Janani Ravichandran and committed by
Greg Kroah-Hartman
911568be 0fd736f9

+2 -4
+1 -2
drivers/staging/iio/accel/sca3000_core.c
··· 216 216 ret = sca3000_read_data_short(st, SCA3000_REG_ADDR_CTRL_DATA, 1); 217 217 if (ret) 218 218 goto error_ret; 219 - else 220 - return st->rx[0]; 219 + return st->rx[0]; 221 220 error_ret: 222 221 return ret; 223 222 }
+1 -2
drivers/staging/iio/accel/sca3000_ring.c
··· 99 99 ret = sca3000_read_data_short(st, SCA3000_REG_ADDR_BUF_COUNT, 1); 100 100 if (ret) 101 101 goto error_ret; 102 - else 103 - num_available = st->rx[0]; 102 + num_available = st->rx[0]; 104 103 /* 105 104 * num_available is the total number of samples available 106 105 * i.e. number of time points * number of channels.