projects
/
linux.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
b4c385b
)
backlight: lm3630a_bl: Simplify probe return on gpio request error
author
Krzysztof Kozlowski
<krzysztof.kozlowski@linaro.org>
Tue, 5 Mar 2024 08:12:01 +0000
(09:12 +0100)
committer
Lee Jones
<lee@kernel.org>
Thu, 7 Mar 2024 09:03:29 +0000
(09:03 +0000)
Code can be simpler: return directly when devm_gpiod_get_optional()
failed.
Reviewed-by: Daniel Thompson <daniel.thompson@linaro.org>
Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Link:
https://lore.kernel.org/r/20240305-backlight-probe-v2-6-609b0cf24bde@linaro.org
Signed-off-by: Lee Jones <lee@kernel.org>
drivers/video/backlight/lm3630a_bl.c
patch
|
blob
|
history
diff --git
a/drivers/video/backlight/lm3630a_bl.c
b/drivers/video/backlight/lm3630a_bl.c
index bb80ad51ca0dfdc208034951d45b90843481e684..76d47e2e82427017d0cc25997245f77d720c9f71 100644
(file)
--- a/
drivers/video/backlight/lm3630a_bl.c
+++ b/
drivers/video/backlight/lm3630a_bl.c
@@
-540,10
+540,8
@@
static int lm3630a_probe(struct i2c_client *client)
pchip->enable_gpio = devm_gpiod_get_optional(&client->dev, "enable",
GPIOD_OUT_HIGH);
- if (IS_ERR(pchip->enable_gpio)) {
- rval = PTR_ERR(pchip->enable_gpio);
- return rval;
- }
+ if (IS_ERR(pchip->enable_gpio))
+ return PTR_ERR(pchip->enable_gpio);
/* chip initialize */
rval = lm3630a_chip_init(pchip);