[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <d42b25da-44d9-465f-b651-134c2179981b@wanadoo.fr>
Date: Sat, 6 Jul 2024 21:47:14 +0200
From: Christophe JAILLET <christophe.jaillet@...adoo.fr>
To: Javier Carrasco <javier.carrasco.cruz@...il.com>,
Xiaowei Song <songxiaowei@...ilicon.com>,
Binghui Wang <wangbinghui@...ilicon.com>,
Lorenzo Pieralisi <lpieralisi@...nel.org>,
Krzysztof Wilczyński <kw@...ux.com>,
Rob Herring <robh@...nel.org>, Jonathan Cameron
<Jonathan.Cameron@...wei.com>, Bjorn Helgaas <bhelgaas@...gle.com>
Cc: linux-pci@...r.kernel.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH 1/2] PCI: kirin: use dev_err_probe() in probe error paths
Le 06/07/2024 à 17:07, Javier Carrasco a écrit :
> dev_err_probe() is used in some probe error paths, yet the
> "dev_err() + return" pattern is used in some others.
>
> Use dev_err_probe() in all error paths with that construction.
>
> Suggested-by: Jonathan Cameron <Jonathan.Cameron@...wei.com>
> Signed-off-by: Javier Carrasco <javier.carrasco.cruz@...il.com>
> ---
...
> - if (ret < 0) {
> - dev_err(dev, "failed to parse devfn: %d\n", ret);
> - return ret;
> - }
> + if (ret < 0)
> + return dev_err_probe(dev, ret,
> + "failed to parse devfn: %d\n", ret);
Hi,
with dev_err_probe(), there is no more need to add 'ret' explicitly in
the message.
CJ
Powered by blists - more mailing lists