mirror of
https://github.com/torvalds/linux.git
synced 2024-11-10 14:11:52 +00:00
backlight: bd6107: Handle deferred probe
Don't pollute dmesg on deferred probe and simplify the code with dev_err_probe(). 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-3-609b0cf24bde@linaro.org Signed-off-by: Lee Jones <lee@kernel.org>
This commit is contained in:
parent
588d9f4b65
commit
a2cd3ab2a4
@ -119,7 +119,6 @@ static int bd6107_probe(struct i2c_client *client)
|
||||
struct backlight_device *backlight;
|
||||
struct backlight_properties props;
|
||||
struct bd6107 *bd;
|
||||
int ret;
|
||||
|
||||
if (pdata == NULL) {
|
||||
dev_err(&client->dev, "No platform data\n");
|
||||
@ -147,11 +146,9 @@ static int bd6107_probe(struct i2c_client *client)
|
||||
* the reset.
|
||||
*/
|
||||
bd->reset = devm_gpiod_get(&client->dev, "reset", GPIOD_OUT_HIGH);
|
||||
if (IS_ERR(bd->reset)) {
|
||||
dev_err(&client->dev, "unable to request reset GPIO\n");
|
||||
ret = PTR_ERR(bd->reset);
|
||||
return ret;
|
||||
}
|
||||
if (IS_ERR(bd->reset))
|
||||
return dev_err_probe(&client->dev, PTR_ERR(bd->reset),
|
||||
"unable to request reset GPIO\n");
|
||||
|
||||
memset(&props, 0, sizeof(props));
|
||||
props.type = BACKLIGHT_RAW;
|
||||
|
Loading…
Reference in New Issue
Block a user