From: Christophe JAILLET <christophe.jaillet@wanadoo.fr>
To: Yang Yingliang <yangyingliang@huawei.com>,
linux-kernel@vger.kernel.org, linux-pci@vger.kernel.org
Cc: bhelgaas@google.com
Subject: Re: [PATCH -next 2/2] PCI: switch to use dev_err_probe()
Date: Wed, 17 Aug 2022 11:11:04 +0200 [thread overview]
Message-ID: <fce4a8ca-5429-22ea-b601-bae4299ac8c0@wanadoo.fr> (raw)
In-Reply-To: <20220817084444.2876059-2-yangyingliang@huawei.com>
Le 17/08/2022 à 10:44, Yang Yingliang a écrit :
> Use dev_err_probe() to simplify code and print error code.
>
> Signed-off-by: Yang Yingliang <yangyingliang@huawei.com>
> ---
> drivers/pci/probe.c | 7 +++----
> 1 file changed, 3 insertions(+), 4 deletions(-)
>
> diff --git a/drivers/pci/probe.c b/drivers/pci/probe.c
> index 0e947f24153e..f2430da8a30b 100644
> --- a/drivers/pci/probe.c
> +++ b/drivers/pci/probe.c
> @@ -3054,10 +3054,9 @@ int pci_host_probe(struct pci_host_bridge *bridge)
> int ret;
>
> ret = pci_scan_root_bus_bridge(bridge);
> - if (ret < 0) {
> - dev_err(bridge->dev.parent, "Scanning root bridge failed");
> - return ret;
> - }
> + if (ret < 0)
> + return dev_err_probe(bridge->dev.parent, ret,
> + "Scanning root bridge failed");
>
> bus = bridge->bus;
>
Nit: you could also add a \n at the end of the message.
Just my 2c,
CJ
prev parent reply other threads:[~2022-08-17 9:11 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-08-17 8:44 [PATCH -next 1/2] PCI: fix possible memory leak in error case in pci_setup_device() Yang Yingliang
2022-08-17 8:44 ` [PATCH -next 2/2] PCI: switch to use dev_err_probe() Yang Yingliang
2022-08-17 9:11 ` Christophe JAILLET [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=fce4a8ca-5429-22ea-b601-bae4299ac8c0@wanadoo.fr \
--to=christophe.jaillet@wanadoo.fr \
--cc=bhelgaas@google.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-pci@vger.kernel.org \
--cc=yangyingliang@huawei.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®