aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorCatalina Mocanu <catalina.mocanu@gmail.com>2014-09-19 18:55:05 -0400
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2014-09-19 20:49:39 -0400
commit288903f6b91e759b0a813219acd376426cbb8f14 (patch)
treefda7a81f6ab7cb837973838ad41f7daed13e955b
parent0a5fcc6b2efdc86619af793e0216a508469cfaa4 (diff)
staging: iio: cdc: Don't put an else right after a return
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>
-rw-r--r--drivers/staging/iio/cdc/ad7150.c10
1 files changed, 3 insertions, 7 deletions
diff --git a/drivers/staging/iio/cdc/ad7150.c b/drivers/staging/iio/cdc/ad7150.c
index 047af2376300..a2b7ae3329c0 100644
--- a/drivers/staging/iio/cdc/ad7150.c
+++ b/drivers/staging/iio/cdc/ad7150.c
@@ -143,19 +143,15 @@ static int ad7150_read_event_config(struct iio_dev *indio_dev,
143 case IIO_EV_TYPE_MAG_ADAPTIVE: 143 case IIO_EV_TYPE_MAG_ADAPTIVE:
144 if (dir == IIO_EV_DIR_RISING) 144 if (dir == IIO_EV_DIR_RISING)
145 return adaptive && (threshtype == 0x1); 145 return adaptive && (threshtype == 0x1);
146 else 146 return adaptive && (threshtype == 0x0);
147 return adaptive && (threshtype == 0x0);
148 case IIO_EV_TYPE_THRESH_ADAPTIVE: 147 case IIO_EV_TYPE_THRESH_ADAPTIVE:
149 if (dir == IIO_EV_DIR_RISING) 148 if (dir == IIO_EV_DIR_RISING)
150 return adaptive && (threshtype == 0x3); 149 return adaptive && (threshtype == 0x3);
151 else 150 return adaptive && (threshtype == 0x2);
152 return adaptive && (threshtype == 0x2);
153
154 case IIO_EV_TYPE_THRESH: 151 case IIO_EV_TYPE_THRESH:
155 if (dir == IIO_EV_DIR_RISING) 152 if (dir == IIO_EV_DIR_RISING)
156 return !adaptive && (threshtype == 0x1); 153 return !adaptive && (threshtype == 0x1);
157 else 154 return !adaptive && (threshtype == 0x0);
158 return !adaptive && (threshtype == 0x0);
159 default: 155 default:
160 break; 156 break;
161 } 157 }