From: Kishon Vijay Abraham I <kishon@ti.com>
To: <gregkh@linuxfoundation.org>
Cc: <kishon@ti.com>, <linux-kernel@vger.kernel.org>
Subject: [PATCH 3/9] phy: fix return value check in armada375_usb_phy_probe()
Date: Sat, 31 Jan 2015 19:58:10 +0530 [thread overview]
Message-ID: <1422714496-423-4-git-send-email-kishon@ti.com> (raw)
In-Reply-To: <1422714496-423-1-git-send-email-kishon@ti.com>
From: Wei Yongjun <yongjun_wei@trendmicro.com.cn>
In case of error, the function devm_ioremap_resource() returns
ERR_PTR() and never returns NULL. The NULL test in the return
value check should be replaced with IS_ERR().
Signed-off-by: Wei Yongjun <yongjun_wei@trendmicro.com.cn>
Signed-off-by: Kishon Vijay Abraham I <kishon@ti.com>
---
drivers/phy/phy-armada375-usb2.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/phy/phy-armada375-usb2.c b/drivers/phy/phy-armada375-usb2.c
index ac7d99d..7c99ca2 100644
--- a/drivers/phy/phy-armada375-usb2.c
+++ b/drivers/phy/phy-armada375-usb2.c
@@ -118,8 +118,8 @@ static int armada375_usb_phy_probe(struct platform_device *pdev)
res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
usb_cluster_base = devm_ioremap_resource(&pdev->dev, res);
- if (!usb_cluster_base)
- return -ENOMEM;
+ if (IS_ERR(usb_cluster_base))
+ return PTR_ERR(usb_cluster_base);
phy = devm_phy_create(dev, NULL, &armada375_usb_phy_ops);
if (IS_ERR(phy)) {
--
1.7.9.5
next prev parent reply other threads:[~2015-01-31 14:28 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-01-31 14:28 [GIT PULL 0/9] phy: for 3.20 merge window Kishon Vijay Abraham I
2015-01-31 14:28 ` [PATCH 1/9] phy: ti-pipe3: Disable clocks on system suspend Kishon Vijay Abraham I
2015-01-31 14:28 ` [PATCH 2/9] phy: ti-pipe3: Fix SATA across suspend/resume Kishon Vijay Abraham I
2015-01-31 14:28 ` Kishon Vijay Abraham I [this message]
2015-01-31 14:28 ` [PATCH 4/9] phy: miphy28lp: Pass sysconfig register offsets via syscfg dt property Kishon Vijay Abraham I
2015-01-31 14:28 ` [PATCH 5/9] phy: phy-stih407-usb: Pass sysconfig register offsets via syscfg property Kishon Vijay Abraham I
2015-01-31 14:28 ` [PATCH 6/9] Documentation: bindings: add dt documentation for Rockchip usb PHY Kishon Vijay Abraham I
2015-01-31 14:28 ` [PATCH 7/9] phy: add a driver for the Rockchip SoC internal USB2.0 PHY Kishon Vijay Abraham I
2015-01-31 14:28 ` [PATCH 8/9] phy: exynos-video-mipi: Fix regression by adding support for PMU regmap Kishon Vijay Abraham I
2015-01-31 14:28 ` [PATCH 9/9] phy: miphy365x: Pass sysconfig register offsets via syscfg dt property Kishon Vijay Abraham I
2015-01-31 16:54 ` [GIT PULL 0/9] phy: for 3.20 merge window Greg KH
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=1422714496-423-4-git-send-email-kishon@ti.com \
--to=kishon@ti.com \
--cc=gregkh@linuxfoundation.org \
--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
Powered by JetHome