From: "Patel, Nirmal" <nirmal.patel@linux.intel.com>
To: korantwork@gmail.com, dlemoal@kernel.org, helgaas@kernel.org,
kbusch@kernel.org, jonathan.derrick@linux.dev,
lpieralisi@kernel.org
Cc: linux-pci@vger.kernel.org, linux-kernel@vger.kernel.org,
Xinghui Li <korantli@tencent.com>,
Dan Carpenter <error27@gmail.com>
Subject: Re: [PATCH v2 1/2] PCI: vmd: Fix one uninitialized symbol error reported by Smatch
Date: Thu, 20 Apr 2023 16:59:43 -0700 [thread overview]
Message-ID: <ba9806d8-2b37-a78e-9199-c7de3cc17172@linux.intel.com> (raw)
In-Reply-To: <20230420094332.1507900-2-korantwork@gmail.com>
On 4/20/2023 2:43 AM, korantwork@gmail.com wrote:
> From: Xinghui Li <korantli@tencent.com>
>
> There is one uninitialized symbol error reported by smatch:
> "drivers/pci/controller/vmd.c:931 vmd_enable_domain()
> error: uninitialized symbol 'ret'."
>
> Fix it by assigning ret with pci_reset_bus return.
>
> Fixes: 0a584655ef89 ("PCI: vmd: Fix secondary bus reset for Intel bridges")
> Reported-by: Dan Carpenter <error27@gmail.com>
> Signed-off-by: Xinghui Li <korantli@tencent.com>
> ---
> drivers/pci/controller/vmd.c | 3 ++-
> 1 file changed, 2 insertions(+), 1 deletion(-)
>
> diff --git a/drivers/pci/controller/vmd.c b/drivers/pci/controller/vmd.c
> index 990630ec57c6..1a36e9a52b93 100644
> --- a/drivers/pci/controller/vmd.c
> +++ b/drivers/pci/controller/vmd.c
> @@ -927,7 +927,8 @@ static int vmd_enable_domain(struct vmd_dev *vmd, unsigned long features)
> if (!list_empty(&child->devices)) {
> dev = list_first_entry(&child->devices,
> struct pci_dev, bus_list);
> - if (pci_reset_bus(dev))
> + ret = pci_reset_bus(dev);
> + if (ret)
> pci_warn(dev, "can't reset device: %d\n", ret);
>
> break;
Reviewed-by: Nirmal Patel <nirmal.patel@linux.intel.com>
next prev parent reply other threads:[~2023-04-21 0:00 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-04-20 9:43 [PATCH v2 0/2] PCI: vmd: Fix two issues in VMD reported by Smatch korantwork
2023-04-20 9:43 ` [PATCH v2 1/2] PCI: vmd: Fix one uninitialized symbol error " korantwork
2023-04-20 23:59 ` Patel, Nirmal [this message]
2023-04-20 9:43 ` [PATCH v2 2/2] PCI: vmd: Clean up one inconsistent indenting warn " korantwork
2023-04-20 23:59 ` Patel, Nirmal
2023-06-24 16:33 ` [PATCH v2 0/2] PCI: vmd: Fix two issues in VMD " Krzysztof Wilczyński
2023-06-25 3:14 ` Xinghui Li
2023-06-25 17:03 ` Krzysztof Wilczyński
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=ba9806d8-2b37-a78e-9199-c7de3cc17172@linux.intel.com \
--to=nirmal.patel@linux.intel.com \
--cc=dlemoal@kernel.org \
--cc=error27@gmail.com \
--cc=helgaas@kernel.org \
--cc=jonathan.derrick@linux.dev \
--cc=kbusch@kernel.org \
--cc=korantli@tencent.com \
--cc=korantwork@gmail.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-pci@vger.kernel.org \
--cc=lpieralisi@kernel.org \
/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