From 0f8ad68b23c50338ad44b1c63bc821a065bdd221 Mon Sep 17 00:00:00 2001 From: Darshana Padmadas Date: Sun, 21 Sep 2014 15:11:41 +0530 Subject: [PATCH] Staging: iio: adc: Fix else after return warning This patch fixes checkpatch.pl warning: WARNING: else is not generally useful after a break or return Signed-off-by: Darshana Padmadas Acked-by: Daniel Baluta Signed-off-by: Greg Kroah-Hartman --- drivers/staging/iio/adc/mxs-lradc.c | 21 +++++++-------------- 1 file changed, 7 insertions(+), 14 deletions(-) diff --git a/drivers/staging/iio/adc/mxs-lradc.c b/drivers/staging/iio/adc/mxs-lradc.c index 75fcb72911f1..f673798678bb 100644 --- a/drivers/staging/iio/adc/mxs-lradc.c +++ b/drivers/staging/iio/adc/mxs-lradc.c @@ -365,56 +365,49 @@ static u32 mxs_lradc_plate_mask(struct mxs_lradc *lradc) { if (lradc->soc == IMX23_LRADC) return LRADC_CTRL0_MX23_PLATE_MASK; - else - return LRADC_CTRL0_MX28_PLATE_MASK; + return LRADC_CTRL0_MX28_PLATE_MASK; } static u32 mxs_lradc_irq_en_mask(struct mxs_lradc *lradc) { if (lradc->soc == IMX23_LRADC) return LRADC_CTRL1_MX23_LRADC_IRQ_EN_MASK; - else - return LRADC_CTRL1_MX28_LRADC_IRQ_EN_MASK; + return LRADC_CTRL1_MX28_LRADC_IRQ_EN_MASK; } static u32 mxs_lradc_irq_mask(struct mxs_lradc *lradc) { if (lradc->soc == IMX23_LRADC) return LRADC_CTRL1_MX23_LRADC_IRQ_MASK; - else - return LRADC_CTRL1_MX28_LRADC_IRQ_MASK; + return LRADC_CTRL1_MX28_LRADC_IRQ_MASK; } static u32 mxs_lradc_touch_detect_bit(struct mxs_lradc *lradc) { if (lradc->soc == IMX23_LRADC) return LRADC_CTRL0_MX23_TOUCH_DETECT_ENABLE; - else - return LRADC_CTRL0_MX28_TOUCH_DETECT_ENABLE; + return LRADC_CTRL0_MX28_TOUCH_DETECT_ENABLE; } static u32 mxs_lradc_drive_x_plate(struct mxs_lradc *lradc) { if (lradc->soc == IMX23_LRADC) return LRADC_CTRL0_MX23_XP | LRADC_CTRL0_MX23_XM; - else - return LRADC_CTRL0_MX28_XPPSW | LRADC_CTRL0_MX28_XNNSW; + return LRADC_CTRL0_MX28_XPPSW | LRADC_CTRL0_MX28_XNNSW; } static u32 mxs_lradc_drive_y_plate(struct mxs_lradc *lradc) { if (lradc->soc == IMX23_LRADC) return LRADC_CTRL0_MX23_YP | LRADC_CTRL0_MX23_YM; - else - return LRADC_CTRL0_MX28_YPPSW | LRADC_CTRL0_MX28_YNNSW; + return LRADC_CTRL0_MX28_YPPSW | LRADC_CTRL0_MX28_YNNSW; } static u32 mxs_lradc_drive_pressure(struct mxs_lradc *lradc) { if (lradc->soc == IMX23_LRADC) return LRADC_CTRL0_MX23_YP | LRADC_CTRL0_MX23_XM; - else - return LRADC_CTRL0_MX28_YPPSW | LRADC_CTRL0_MX28_XNNSW; + return LRADC_CTRL0_MX28_YPPSW | LRADC_CTRL0_MX28_XNNSW; } static bool mxs_lradc_check_touch_event(struct mxs_lradc *lradc) -- 2.39.5