lkml.org 
[lkml]   [2021]   [Sep]   [14]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH] PCI: Remove redundant initialization of variable rc
Hi Colin,

> The variable rc is being initialized with a value that is never read, it
> is being updated later on. The assignment is redundant and can be removed.
>
> Addresses-Coverity: ("Unused value")
> Signed-off-by: Colin Ian King <colin.king@canonical.com>
> ---
> drivers/pci/pci.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/pci/pci.c b/drivers/pci/pci.c
> index ce2ab62b64cf..cd8cb94cc450 100644
> --- a/drivers/pci/pci.c
> +++ b/drivers/pci/pci.c
> @@ -5288,7 +5288,7 @@ const struct attribute_group pci_dev_reset_method_attr_group = {
> */
> int __pci_reset_function_locked(struct pci_dev *dev)
> {
> - int i, m, rc = -ENOTTY;
> + int i, m, rc;

Thank you!

Reviewed-by: Krzysztof Wilczyński <kw@linux.com>

Krzysztof

\
 
 \ /
  Last update: 2021-09-15 03:24    [W:0.056 / U:0.076 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site