Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1421449 > unrolled thread

[PATCH] phy: rockchip-dp: fix return value check in rockchip_dp_phy_probe()

Started byweiyj_lk@163.com
First post2016-06-14 01:40 +0200
Last post2016-06-17 15:20 +0200
Articles 3 — 3 participants

Back to article view | Back to linux.kernel


Contents

  [PATCH] phy: rockchip-dp: fix return value check in rockchip_dp_phy_probe() weiyj_lk@163.com - 2016-06-14 01:40 +0200
    Re: [PATCH] phy: rockchip-dp: fix return value check in rockchip_dp_phy_probe() Heiko Stübner <heiko@sntech.de> - 2016-06-14 08:50 +0200
      Re: [PATCH] phy: rockchip-dp: fix return value check in  rockchip_dp_phy_probe() Kishon Vijay Abraham I <kishon@ti.com> - 2016-06-17 15:20 +0200

#1421449 — [PATCH] phy: rockchip-dp: fix return value check in rockchip_dp_phy_probe()

Fromweiyj_lk@163.com
Date2016-06-14 01:40 +0200
Subject[PATCH] phy: rockchip-dp: fix return value check in rockchip_dp_phy_probe()
Message-ID<rJJCx-4Wb-11@gated-at.bofh.it>
From: Wei Yongjun <yongjun_wei@trendmicro.com.cn>

In case of error, the function devm_kzalloc() returns NULL pointer
not ERR_PTR(). The IS_ERR() test in the return value check should
be replaced with NULL test.

Signed-off-by: Wei Yongjun <yongjun_wei@trendmicro.com.cn>
---
 drivers/phy/phy-rockchip-dp.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/phy/phy-rockchip-dp.c b/drivers/phy/phy-rockchip-dp.c
index 793ecb6..8b267a7 100644
--- a/drivers/phy/phy-rockchip-dp.c
+++ b/drivers/phy/phy-rockchip-dp.c
@@ -90,7 +90,7 @@ static int rockchip_dp_phy_probe(struct platform_device *pdev)
 		return -ENODEV;
 
 	dp = devm_kzalloc(dev, sizeof(*dp), GFP_KERNEL);
-	if (IS_ERR(dp))
+	if (!dp)
 		return -ENOMEM;
 
 	dp->dev = dev;

[toc] | [next] | [standalone]


#1421615

FromHeiko Stübner <heiko@sntech.de>
Date2016-06-14 08:50 +0200
Message-ID<rJQkF-16U-5@gated-at.bofh.it>
In reply to#1421449
Am Montag, 13. Juni 2016, 23:31:47 schrieb weiyj_lk@163.com:
> From: Wei Yongjun <yongjun_wei@trendmicro.com.cn>
> 
> In case of error, the function devm_kzalloc() returns NULL pointer
> not ERR_PTR(). The IS_ERR() test in the return value check should
> be replaced with NULL test.
> 
> Signed-off-by: Wei Yongjun <yongjun_wei@trendmicro.com.cn>

obviously correct, thanks for catching.

Reviewed-by: Heiko Stuebner <heiko@sntech.de>

[toc] | [prev] | [next] | [standalone]


#1425060 — Re: [PATCH] phy: rockchip-dp: fix return value check in rockchip_dp_phy_probe()

FromKishon Vijay Abraham I <kishon@ti.com>
Date2016-06-17 15:20 +0200
SubjectRe: [PATCH] phy: rockchip-dp: fix return value check in rockchip_dp_phy_probe()
Message-ID<rL1QJ-70p-9@gated-at.bofh.it>
In reply to#1421615

On Tuesday 14 June 2016 12:09 PM, Heiko Stübner wrote:
> Am Montag, 13. Juni 2016, 23:31:47 schrieb weiyj_lk@163.com:
>> From: Wei Yongjun <yongjun_wei@trendmicro.com.cn>
>>
>> In case of error, the function devm_kzalloc() returns NULL pointer
>> not ERR_PTR(). The IS_ERR() test in the return value check should
>> be replaced with NULL test.
>>
>> Signed-off-by: Wei Yongjun <yongjun_wei@trendmicro.com.cn>
> 
> obviously correct, thanks for catching.
> 
> Reviewed-by: Heiko Stuebner <heiko@sntech.de>

applied, thanks.

-Kishon

[toc] | [prev] | [standalone]


Back to top | Article view | linux.kernel


csiph-web