diff mbox series

[v1,1/1] pinctrl: baytrail: Drop duplicate return statement

Message ID 20240903154755.3460442-1-andriy.shevchenko@linux.intel.com
State New
Headers show
Series [v1,1/1] pinctrl: baytrail: Drop duplicate return statement | expand

Commit Message

Andy Shevchenko Sept. 3, 2024, 3:47 p.m. UTC
No need to repeat 'return ret;' inside and outside conditional.
Just use one outside conditional for both cases.

Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
---
 drivers/pinctrl/intel/pinctrl-baytrail.c | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)

Comments

Mika Westerberg Sept. 4, 2024, 5:02 a.m. UTC | #1
On Tue, Sep 03, 2024 at 06:47:55PM +0300, Andy Shevchenko wrote:
> No need to repeat 'return ret;' inside and outside conditional.
> Just use one outside conditional for both cases.
> 
> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>

Acked-by: Mika Westerberg <mika.westerberg@linux.intel.com>
diff mbox series

Patch

diff --git a/drivers/pinctrl/intel/pinctrl-baytrail.c b/drivers/pinctrl/intel/pinctrl-baytrail.c
index 6dab0316715b..ad6a5e7157ee 100644
--- a/drivers/pinctrl/intel/pinctrl-baytrail.c
+++ b/drivers/pinctrl/intel/pinctrl-baytrail.c
@@ -1535,10 +1535,8 @@  static int byt_gpio_probe(struct intel_pinctrl *vg)
 	}
 
 	ret = devm_gpiochip_add_data(vg->dev, gc, vg);
-	if (ret) {
+	if (ret)
 		dev_err(vg->dev, "failed adding byt-gpio chip\n");
-		return ret;
-	}
 
 	return ret;
 }