staging: iio: accel: Remove unnecessary else after goto in if block
authorJanani Ravichandran <janani.rvchndrn@gmail.com>
Thu, 18 Feb 2016 21:22:29 +0000 (16:22 -0500)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sat, 20 Feb 2016 22:45:05 +0000 (14:45 -0800)
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>
drivers/staging/iio/accel/sca3000_core.c
drivers/staging/iio/accel/sca3000_ring.c

index 02e930c55570237817e24c629b3f7df11fbd1fdd..a8f533af9ecaeffcd39143ca1379dd8186714179 100644 (file)
@@ -216,8 +216,7 @@ static int sca3000_read_ctrl_reg(struct sca3000_state *st,
        ret = sca3000_read_data_short(st, SCA3000_REG_ADDR_CTRL_DATA, 1);
        if (ret)
                goto error_ret;
-       else
-               return st->rx[0];
+       return st->rx[0];
 error_ret:
        return ret;
 }
index 1920dc60cf3d2b4e879e11995355c42343b5e341..d1cb9b9cf22b21ed551f88dcf17f745a0cf23065 100644 (file)
@@ -99,8 +99,7 @@ static int sca3000_read_first_n_hw_rb(struct iio_buffer *r,
        ret = sca3000_read_data_short(st, SCA3000_REG_ADDR_BUF_COUNT, 1);
        if (ret)
                goto error_ret;
-       else
-               num_available = st->rx[0];
+       num_available = st->rx[0];
        /*
         * num_available is the total number of samples available
         * i.e. number of time points * number of channels.