* [PATCH -next] gpio: simplify the return expression of cs5535_gpio_probe()
@ 2020-12-10 13:56 Zheng Yongjun
2020-12-12 0:38 ` Linus Walleij
0 siblings, 1 reply; 2+ messages in thread
From: Zheng Yongjun @ 2020-12-10 13:56 UTC (permalink / raw)
To: linus.walleij, bgolaszewski, linux-gpio, linux-kernel; +Cc: Zheng Yongjun
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(-)
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 = {
--
2.22.0
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH -next] gpio: simplify the return expression of cs5535_gpio_probe()
2020-12-10 13:56 [PATCH -next] gpio: simplify the return expression of cs5535_gpio_probe() Zheng Yongjun
@ 2020-12-12 0:38 ` Linus Walleij
0 siblings, 0 replies; 2+ messages in thread
From: Linus Walleij @ 2020-12-12 0:38 UTC (permalink / raw)
To: Zheng Yongjun; +Cc: Bartosz Golaszewski, open list:GPIO SUBSYSTEM, linux-kernel
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
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2020-12-12 0:51 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-12-10 13:56 [PATCH -next] gpio: simplify the return expression of cs5535_gpio_probe() Zheng Yongjun
2020-12-12 0:38 ` Linus Walleij
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).