[PATCH 4/7] iio/ti_am335x_adc: remove the else case

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



The DT support added in ("iio: adc: am335x: Add DT support")
added an else case which shifts the code to the righ for no reaseon.
This patch simply removes the pointless else case and shifts the code
back to the left.

Signed-off-by: Sebastian Andrzej Siewior <bigeasy@xxxxxxxxxxxxx>
---
 drivers/iio/adc/ti_am335x_adc.c |   13 +++++--------
 1 file changed, 5 insertions(+), 8 deletions(-)

diff --git a/drivers/iio/adc/ti_am335x_adc.c b/drivers/iio/adc/ti_am335x_adc.c
index f258eb0..ac78672 100644
--- a/drivers/iio/adc/ti_am335x_adc.c
+++ b/drivers/iio/adc/ti_am335x_adc.c
@@ -214,14 +214,11 @@ static int tiadc_probe(struct platform_device *pdev)
 		node = of_get_child_by_name(node, "adc");
 		if (!node)
 			return  -EINVAL;
-		else {
-			err = of_property_read_u32(node,
-					"ti,adc-channels", &val32);
-			if (err < 0)
-				goto err_free_device;
-			else
-				adc_dev->channels = val32;
-		}
+		err = of_property_read_u32(node,
+				"ti,adc-channels", &val32);
+		if (err < 0)
+			goto err_free_device;
+		adc_dev->channels = val32;
 	}
 
 	indio_dev->dev.parent = &pdev->dev;
-- 
1.7.10.4

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




[Index of Archives]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Input]     [Linux Kernel]     [Linux SCSI]     [X.org]

  Powered by Linux