Use dev_err_probe() when printing error message in pin_request() since
it may fail with -EPROBE_DEFER.
Signed-off-by: Jernej Skrabec <[email protected]>
---
drivers/pinctrl/pinmux.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/pinctrl/pinmux.c b/drivers/pinctrl/pinmux.c
index 301fe0157b02..4a9776a99d20 100644
--- a/drivers/pinctrl/pinmux.c
+++ b/drivers/pinctrl/pinmux.c
@@ -188,8 +188,8 @@ static int pin_request(struct pinctrl_dev *pctldev,
}
out:
if (status)
- dev_err(pctldev->dev, "pin-%d (%s) status %d\n",
- pin, owner, status);
+ dev_err_probe(pctldev->dev, "pin-%d (%s) status %d\n",
+ pin, owner, status);
return status;
}
--
2.42.0
Hi Jenej,
thanks for your patch!
On Sat, Sep 9, 2023 at 8:36 AM Jernej Skrabec <[email protected]> wrote:
> Use dev_err_probe() when printing error message in pin_request() since
> it may fail with -EPROBE_DEFER.
>
> Signed-off-by: Jernej Skrabec <[email protected]>
(...)
> if (status)
> - dev_err(pctldev->dev, "pin-%d (%s) status %d\n",
> - pin, owner, status);
> + dev_err_probe(pctldev->dev, "pin-%d (%s) status %d\n",
> + pin, owner, status);
>
> return status;
That's not how you use dev_err_probe()
Just replace all of the lines above with return dev_err_probe(...)
Yours,
Linus Walleij
Dne torek, 12. september 2023 ob 10:15:31 CEST je Linus Walleij napisal(a):
> Hi Jenej,
>
> thanks for your patch!
>
> On Sat, Sep 9, 2023 at 8:36 AM Jernej Skrabec <[email protected]>
wrote:
> > Use dev_err_probe() when printing error message in pin_request() since
> > it may fail with -EPROBE_DEFER.
> >
> > Signed-off-by: Jernej Skrabec <[email protected]>
>
> (...)
>
> > if (status)
> >
> > - dev_err(pctldev->dev, "pin-%d (%s) status %d\n",
> > - pin, owner, status);
> > + dev_err_probe(pctldev->dev, "pin-%d (%s) status %d\n",
> > + pin, owner, status);
> >
> > return status;
>
> That's not how you use dev_err_probe()
>
> Just replace all of the lines above with return dev_err_probe(...)
I already send v2 of this patch soon after I got report from kernel test
robot.
Best regards,
Jernej
>
> Yours,
> Linus Walleij