staging: iio: cdc: Don't put an else right after a return
authorCatalina Mocanu <catalina.mocanu@gmail.com>
Fri, 19 Sep 2014 22:55:05 +0000 (15:55 -0700)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sat, 20 Sep 2014 00:49:39 +0000 (17:49 -0700)
This fixes the following checkpatch.pl warning:
WARNING: else is not generally useful after a break or return.

While at it, remove new line for symmetry with the rest of the code.

Signed-off-by: Catalina Mocanu <catalina.mocanu@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/staging/iio/cdc/ad7150.c

index 047af23763004f7a96136d359639cbbd3a8b9aa4..a2b7ae3329c0e56cd345340a7c0c6426cfe621fd 100644 (file)
@@ -143,19 +143,15 @@ static int ad7150_read_event_config(struct iio_dev *indio_dev,
        case IIO_EV_TYPE_MAG_ADAPTIVE:
                if (dir == IIO_EV_DIR_RISING)
                        return adaptive && (threshtype == 0x1);
-               else
-                       return adaptive && (threshtype == 0x0);
+               return adaptive && (threshtype == 0x0);
        case IIO_EV_TYPE_THRESH_ADAPTIVE:
                if (dir == IIO_EV_DIR_RISING)
                        return adaptive && (threshtype == 0x3);
-               else
-                       return adaptive && (threshtype == 0x2);
-
+               return adaptive && (threshtype == 0x2);
        case IIO_EV_TYPE_THRESH:
                if (dir == IIO_EV_DIR_RISING)
                        return !adaptive && (threshtype == 0x1);
-               else
-                       return !adaptive && (threshtype == 0x0);
+               return !adaptive && (threshtype == 0x0);
        default:
                break;
        }