diff mbox series

staging: mt7621-pci-phy: prevent use of uninitialized variable

Message ID 20190404124414.22846-1-detegr@gmail.com
State New
Headers show
Series staging: mt7621-pci-phy: prevent use of uninitialized variable | expand

Commit Message

Antti Keränen April 4, 2019, 12:44 p.m. UTC
Do not use uninitialized variable 'port' when printing an error message

Signed-off-by: Antti Keränen <detegr@gmail.com>
---
 drivers/staging/mt7621-pci-phy/pci-mt7621-phy.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Sergio Paracuellos April 4, 2019, 12:55 p.m. UTC | #1
On Thu, Apr 4, 2019 at 2:46 PM Antti Keränen <detegr@gmail.com> wrote:
>
> Do not use uninitialized variable 'port' when printing an error message
>
> Signed-off-by: Antti Keränen <detegr@gmail.com>
> ---
>  drivers/staging/mt7621-pci-phy/pci-mt7621-phy.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/staging/mt7621-pci-phy/pci-mt7621-phy.c b/drivers/staging/mt7621-pci-phy/pci-mt7621-phy.c
> index 118302c122ee..aa3ae7777632 100644
> --- a/drivers/staging/mt7621-pci-phy/pci-mt7621-phy.c
> +++ b/drivers/staging/mt7621-pci-phy/pci-mt7621-phy.c
> @@ -331,7 +331,7 @@ static int mt7621_pci_phy_probe(struct platform_device *pdev)
>
>         ret = of_address_to_resource(np, 0, &res);
>         if (ret) {
> -               dev_err(dev, "failed to get address resource(id-%d)\n", port);
> +               dev_err(dev, "failed to get address resource\n");
>                 return ret;
>         }

Reviewed-by: Sergio Paracuellos <sergio.paracuellos@gmail.com>

Thanks,
     Sergio Paracuellos

>
> --
> 2.21.0
>
diff mbox series

Patch

diff --git a/drivers/staging/mt7621-pci-phy/pci-mt7621-phy.c b/drivers/staging/mt7621-pci-phy/pci-mt7621-phy.c
index 118302c122ee..aa3ae7777632 100644
--- a/drivers/staging/mt7621-pci-phy/pci-mt7621-phy.c
+++ b/drivers/staging/mt7621-pci-phy/pci-mt7621-phy.c
@@ -331,7 +331,7 @@  static int mt7621_pci_phy_probe(struct platform_device *pdev)
 
 	ret = of_address_to_resource(np, 0, &res);
 	if (ret) {
-		dev_err(dev, "failed to get address resource(id-%d)\n", port);
+		dev_err(dev, "failed to get address resource\n");
 		return ret;
 	}