By re-arranging the code, 'ret' can be removed from this function. Signed-off-by: Sachin Kamat <sachin.kamat@xxxxxxxxxxx> Cc: Barry Song <21cnbao@xxxxxxxxx> --- drivers/iio/dac/ad5624r_spi.c | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/drivers/iio/dac/ad5624r_spi.c b/drivers/iio/dac/ad5624r_spi.c index e8199cc..61bb9d4 100644 --- a/drivers/iio/dac/ad5624r_spi.c +++ b/drivers/iio/dac/ad5624r_spi.c @@ -67,7 +67,6 @@ static int ad5624r_write_raw(struct iio_dev *indio_dev, long mask) { struct ad5624r_state *st = iio_priv(indio_dev); - int ret; switch (mask) { case IIO_CHAN_INFO_RAW: @@ -79,10 +78,8 @@ static int ad5624r_write_raw(struct iio_dev *indio_dev, chan->address, val, chan->scan_type.shift); default: - ret = -EINVAL; + return -EINVAL; } - - return -EINVAL; } static const char * const ad5624r_powerdown_modes[] = { -- 1.7.9.5 -- To unsubscribe from this list: send the line "unsubscribe linux-iio" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html