Skip to contentSkip to conversation

Drivers:iio:adc: else is not generally useful after a break or return

PATCH In review [email protected] 2 participants 2 messages Dec 29, 2017

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 4/4 Drivers:iio:adc: else is not generally useful after a break or return

From: Venkat Prashanth B U <[email protected]>

Fixes checkpatch warnings:
WARNING: else is not generally useful after a break or return

---
 drivers/iio/adc/at91_adc.c | 1 -
 1 file changed, 1 deletion(-)
drivers/iio/adc/at91_adc.c +0 -1
index 7b40925..da18c04 100644
@@ -939,7 +939,6 @@ static int at91_adc_probe_dt(struct at91_adc_state *st,
 	/* Check if touchscreen is supported. */
 	if (st->caps->has_ts)
 		return at91_adc_probe_dt_ts(node, st, &idev->dev);
-	else
 		dev_info(&idev->dev, "not support touchscreen in the adc compatible string.\n");
 
 	return 0;

--
1.9.1

maintainer
#1 lore raw
Quoted 6 lines · On Fri, 29 Dec 2017 22:23:09 +0530 [email protected] wrote:

From: Venkat Prashanth B U <[email protected]>

Fixes checkpatch warnings:
WARNING: else is not generally useful after a break or return

Please then run checkpatch on the result + ideally sparse / smatch.

The result of this is wrong indentation.

Jonathan

Quoted 23 lines
---
 drivers/iio/adc/at91_adc.c | 1 -
 1 file changed, 1 deletion(-)
drivers/iio/adc/at91_adc.c +0 -2
index 7b40925..da18c04 100644
@@ -939,7 +939,6 @@ static int at91_adc_probe_dt(struct at91_adc_state *st,
 	/* Check if touchscreen is supported. */
 	if (st->caps->has_ts)
 		return at91_adc_probe_dt_ts(node, st, &idev->dev);
-	else
 		dev_info(&idev->dev, "not support touchscreen in the adc compatible string.\n");
 
 	return 0;
--

1.9.1

--
To unsubscribe from this list: send the line "unsubscribe linux-iio" in the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html