linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Srinath Mannam <srinath.mannam@broadcom.com>
To: Kishon Vijay Abraham I <kishon@ti.com>,
	Florian Fainelli <florian.fainelli@broadcom.com>
Cc: linux-kernel@vger.kernel.org,
	Srinath Mannam <srinath.mannam@broadcom.com>
Subject: [PATCH] phy: sr-usb: fix build warning
Date: Wed, 27 Mar 2019 19:45:47 +0530	[thread overview]
Message-ID: <1553696147-32633-1-git-send-email-srinath.mannam@broadcom.com> (raw)

Add invalid version check to fix below warning reported for stingray
usb phy driver.

The kbuild robot reports:

drivers/phy/broadcom/phy-bcm-sr-usb.c: In function 'bcm_usb_phy_probe':
warning: 'phy_cfg' may be used uninitialized in this function

Fixes: a3b96057577 (phy: sr-usb: Add Stingray USB PHY driver)
Reported-by: kbuild test robot <lkp@intel.com>
Signed-off-by: Srinath Mannam <srinath.mannam@broadcom.com>
---
 drivers/phy/broadcom/phy-bcm-sr-usb.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/drivers/phy/broadcom/phy-bcm-sr-usb.c b/drivers/phy/broadcom/phy-bcm-sr-usb.c
index bfe8237..fe6c589 100644
--- a/drivers/phy/broadcom/phy-bcm-sr-usb.c
+++ b/drivers/phy/broadcom/phy-bcm-sr-usb.c
@@ -328,7 +328,8 @@ static int bcm_usb_phy_create(struct device *dev, struct device_node *node,
 			return PTR_ERR(phy_cfg->phy);
 
 		phy_set_drvdata(phy_cfg->phy, phy_cfg);
-	}
+	} else
+		return -ENODEV;
 
 	dev_set_drvdata(dev, phy_cfg);
 
-- 
2.7.4


                 reply	other threads:[~2019-03-27 14:16 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

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=1553696147-32633-1-git-send-email-srinath.mannam@broadcom.com \
    --to=srinath.mannam@broadcom.com \
    --cc=florian.fainelli@broadcom.com \
    --cc=kishon@ti.com \
    --cc=linux-kernel@vger.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;
as well as URLs for NNTP newsgroup(s).