From patchwork Wed May 22 21:08:14 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sebastian Andrzej Siewior X-Patchwork-Id: 2603621 Return-Path: X-Original-To: patchwork-linux-input@patchwork.kernel.org Delivered-To: patchwork-process-083081@patchwork2.kernel.org Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by patchwork2.kernel.org (Postfix) with ESMTP id 99567DF215 for ; Wed, 22 May 2013 21:08:58 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1757323Ab3EVVIk (ORCPT ); Wed, 22 May 2013 17:08:40 -0400 Received: from www.linutronix.de ([62.245.132.108]:58891 "EHLO Galois.linutronix.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1757319Ab3EVVIi (ORCPT ); Wed, 22 May 2013 17:08:38 -0400 Received: from localhost ([127.0.0.1] helo=localhost.localdomain) by Galois.linutronix.de with esmtp (Exim 4.72) (envelope-from ) id 1UfGGz-0001JO-Pi; Wed, 22 May 2013 23:08:37 +0200 From: Sebastian Andrzej Siewior To: linux-iio@vger.kernel.org, linux-input@vger.kernel.org Cc: Jonathan Cameron , Dmitry Torokhov , Samuel Ortiz , Felipe Balbi , "Patil Rachna" , Sebastian Andrzej Siewior Subject: [PATCH 4/7] iio/ti_am335x_adc: remove the else case Date: Wed, 22 May 2013 23:08:14 +0200 Message-Id: <1369256897-25984-4-git-send-email-bigeasy@linutronix.de> X-Mailer: git-send-email 1.7.10.4 In-Reply-To: <1369256897-25984-1-git-send-email-bigeasy@linutronix.de> References: <1369256897-25984-1-git-send-email-bigeasy@linutronix.de> X-Linutronix-Spam-Score: -1.0 X-Linutronix-Spam-Level: - X-Linutronix-Spam-Status: No , -1.0 points, 5.0 required, ALL_TRUSTED=-1, SHORTCIRCUIT=-0.0001 Sender: linux-input-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-input@vger.kernel.org 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 --- 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;