All of lore.kernel.org
 help / color / mirror / Atom feed
From: Wang Wensheng <wangwensheng4@huawei.com>
To: <kishon@ti.com>, <vkoul@kernel.org>, <sjakhade@cadence.com>,
	<p.zabel@pengutronix.de>, <wangwensheng4@huawei.com>,
	<rikard.falkeborn@gmail.com>, <sparmar@cadence.com>,
	<chunfeng.yun@mediatek.com>, <linux-phy@lists.infradead.org>,
	<linux-kernel@vger.kernel.org>
Cc: <rui.xiang@huawei.com>
Subject: [PATCH -next] phy: cadence: Sierra: Fix error return code in cdns_sierra_phy_probe()
Date: Mon, 17 May 2021 01:57:49 +0000	[thread overview]
Message-ID: <20210517015749.127799-1-wangwensheng4@huawei.com> (raw)

Fix to return a negative error code from the error handling
case instead of 0, as done elsewhere in this function.

Fixes: a43f72ae136a ("phy: cadence: Sierra: Change MAX_LANES of Sierra to 16")
Reported-by: Hulk Robot <hulkci@huawei.com>
Signed-off-by: Wang Wensheng <wangwensheng4@huawei.com>
---
 drivers/phy/cadence/phy-cadence-sierra.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/drivers/phy/cadence/phy-cadence-sierra.c b/drivers/phy/cadence/phy-cadence-sierra.c
index 5c68e31..e93818e 100644
--- a/drivers/phy/cadence/phy-cadence-sierra.c
+++ b/drivers/phy/cadence/phy-cadence-sierra.c
@@ -940,6 +940,7 @@ static int cdns_sierra_phy_probe(struct platform_device *pdev)
 	sp->nsubnodes = node;
 
 	if (sp->num_lanes > SIERRA_MAX_LANES) {
+		ret = -EINVAL;
 		dev_err(dev, "Invalid lane configuration\n");
 		goto put_child2;
 	}
-- 
2.9.4


WARNING: multiple messages have this Message-ID (diff)
From: Wang Wensheng <wangwensheng4@huawei.com>
To: <kishon@ti.com>, <vkoul@kernel.org>, <sjakhade@cadence.com>,
	<p.zabel@pengutronix.de>, <wangwensheng4@huawei.com>,
	<rikard.falkeborn@gmail.com>, <sparmar@cadence.com>,
	<chunfeng.yun@mediatek.com>, <linux-phy@lists.infradead.org>,
	<linux-kernel@vger.kernel.org>
Cc: <rui.xiang@huawei.com>
Subject: [PATCH -next] phy: cadence: Sierra: Fix error return code in cdns_sierra_phy_probe()
Date: Mon, 17 May 2021 01:57:49 +0000	[thread overview]
Message-ID: <20210517015749.127799-1-wangwensheng4@huawei.com> (raw)

Fix to return a negative error code from the error handling
case instead of 0, as done elsewhere in this function.

Fixes: a43f72ae136a ("phy: cadence: Sierra: Change MAX_LANES of Sierra to 16")
Reported-by: Hulk Robot <hulkci@huawei.com>
Signed-off-by: Wang Wensheng <wangwensheng4@huawei.com>
---
 drivers/phy/cadence/phy-cadence-sierra.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/drivers/phy/cadence/phy-cadence-sierra.c b/drivers/phy/cadence/phy-cadence-sierra.c
index 5c68e31..e93818e 100644
--- a/drivers/phy/cadence/phy-cadence-sierra.c
+++ b/drivers/phy/cadence/phy-cadence-sierra.c
@@ -940,6 +940,7 @@ static int cdns_sierra_phy_probe(struct platform_device *pdev)
 	sp->nsubnodes = node;
 
 	if (sp->num_lanes > SIERRA_MAX_LANES) {
+		ret = -EINVAL;
 		dev_err(dev, "Invalid lane configuration\n");
 		goto put_child2;
 	}
-- 
2.9.4


-- 
linux-phy mailing list
linux-phy@lists.infradead.org
https://lists.infradead.org/mailman/listinfo/linux-phy

             reply	other threads:[~2021-05-17  1:58 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-05-17  1:57 Wang Wensheng [this message]
2021-05-17  1:57 ` [PATCH -next] phy: cadence: Sierra: Fix error return code in cdns_sierra_phy_probe() Wang Wensheng
2021-05-31  8:20 ` Vinod Koul
2021-05-31  8:20   ` Vinod Koul

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=20210517015749.127799-1-wangwensheng4@huawei.com \
    --to=wangwensheng4@huawei.com \
    --cc=chunfeng.yun@mediatek.com \
    --cc=kishon@ti.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-phy@lists.infradead.org \
    --cc=p.zabel@pengutronix.de \
    --cc=rikard.falkeborn@gmail.com \
    --cc=rui.xiang@huawei.com \
    --cc=sjakhade@cadence.com \
    --cc=sparmar@cadence.com \
    --cc=vkoul@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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.