linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] phy: rockchip-dp: fix return value check in rockchip_dp_phy_probe()
@ 2016-06-13 23:31 weiyj_lk
  2016-06-14  6:39 ` Heiko Stübner
  0 siblings, 1 reply; 3+ messages in thread
From: weiyj_lk @ 2016-06-13 23:31 UTC (permalink / raw)
  To: Kishon Vijay Abraham I, Heiko Stuebner
  Cc: Wei Yongjun, linux-kernel, linux-arm-kernel, linux-rockchip

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;

^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [PATCH] phy: rockchip-dp: fix return value check in rockchip_dp_phy_probe()
  2016-06-13 23:31 [PATCH] phy: rockchip-dp: fix return value check in rockchip_dp_phy_probe() weiyj_lk
@ 2016-06-14  6:39 ` Heiko Stübner
  2016-06-17 13:15   ` Kishon Vijay Abraham I
  0 siblings, 1 reply; 3+ messages in thread
From: Heiko Stübner @ 2016-06-14  6:39 UTC (permalink / raw)
  To: weiyj_lk
  Cc: Kishon Vijay Abraham I, Wei Yongjun, linux-kernel,
	linux-arm-kernel, linux-rockchip

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>

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH] phy: rockchip-dp: fix return value check in rockchip_dp_phy_probe()
  2016-06-14  6:39 ` Heiko Stübner
@ 2016-06-17 13:15   ` Kishon Vijay Abraham I
  0 siblings, 0 replies; 3+ messages in thread
From: Kishon Vijay Abraham I @ 2016-06-17 13:15 UTC (permalink / raw)
  To: Heiko Stübner, weiyj_lk
  Cc: Wei Yongjun, linux-kernel, linux-arm-kernel, linux-rockchip



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

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2016-06-17 13:16 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-06-13 23:31 [PATCH] phy: rockchip-dp: fix return value check in rockchip_dp_phy_probe() weiyj_lk
2016-06-14  6:39 ` Heiko Stübner
2016-06-17 13:15   ` Kishon Vijay Abraham I

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).