mirror of
https://github.com/torvalds/linux.git
synced 2024-11-10 22:21:40 +00:00
gpio: dwapb: Remove unnecessary error message
In dwapb_get_reset(), if devm_reset_control_get_optional_shared() fails, an error message is printed even if the failure is the benign EPROBE_DEFER error due to the reset controller not yet being initialized. Use dev_err_probe() to handle devm_reset_control_get_optional_shared() errors to avoid unnecessarilly printing an error message for the deferred probe error. Signed-off-by: Damien Le Moal <damien.lemoal@wdc.com> Signed-off-by: Bartosz Golaszewski <bgolaszewski@baylibre.com>
This commit is contained in:
parent
5300ebb695
commit
7d3615ae40
@ -616,10 +616,9 @@ static int dwapb_get_reset(struct dwapb_gpio *gpio)
|
||||
int err;
|
||||
|
||||
gpio->rst = devm_reset_control_get_optional_shared(gpio->dev, NULL);
|
||||
if (IS_ERR(gpio->rst)) {
|
||||
dev_err(gpio->dev, "Cannot get reset descriptor\n");
|
||||
return PTR_ERR(gpio->rst);
|
||||
}
|
||||
if (IS_ERR(gpio->rst))
|
||||
return dev_err_probe(gpio->dev, PTR_ERR(gpio->rst),
|
||||
"Cannot get reset descriptor\n");
|
||||
|
||||
err = reset_control_deassert(gpio->rst);
|
||||
if (err) {
|
||||
|
Loading…
Reference in New Issue
Block a user