diff mbox series

[-next] gpio: simplify the return expression of cs5535_gpio_probe()

Message ID 20201210135609.1372-1-zhengyongjun3@huawei.com
State New
Headers show
Series [-next] gpio: simplify the return expression of cs5535_gpio_probe() | expand

Commit Message

Zheng Yongjun Dec. 10, 2020, 1:56 p.m. UTC
Simplify the return expression.

Signed-off-by: Zheng Yongjun <zhengyongjun3@huawei.com>
---
 drivers/gpio/gpio-cs5535.c | 8 ++------
 1 file changed, 2 insertions(+), 6 deletions(-)

Comments

Linus Walleij Dec. 12, 2020, 12:38 a.m. UTC | #1
On Thu, Dec 10, 2020 at 2:55 PM Zheng Yongjun <zhengyongjun3@huawei.com> wrote:

> Simplify the return expression.
>
> Signed-off-by: Zheng Yongjun <zhengyongjun3@huawei.com>

Patch applied.

Yours,
Linus Walleij
diff mbox series

Patch

diff --git a/drivers/gpio/gpio-cs5535.c b/drivers/gpio/gpio-cs5535.c
index 53b24e3ae7de..6da3a247614a 100644
--- a/drivers/gpio/gpio-cs5535.c
+++ b/drivers/gpio/gpio-cs5535.c
@@ -345,12 +345,8 @@  static int cs5535_gpio_probe(struct platform_device *pdev)
 				mask_orig, mask);
 
 	/* finally, register with the generic GPIO API */
-	err = devm_gpiochip_add_data(&pdev->dev, &cs5535_gpio_chip.chip,
-				     &cs5535_gpio_chip);
-	if (err)
-		return err;
-
-	return 0;
+	return devm_gpiochip_add_data(&pdev->dev, &cs5535_gpio_chip.chip,
+				      &cs5535_gpio_chip);
 }
 
 static struct platform_driver cs5535_gpio_driver = {