mailbox: xgene-slimpro: Fix wrong test for devm_kzalloc
PATCH 1/1 mailbox: xgene-slimpro: Fix wrong test for devm_kzalloc
devm_kzalloc() returns NULL on failure.
Signed-off-by Axel Lin <[email protected]>
--- drivers/mailbox/mailbox-xgene-slimpro.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
drivers/mailbox/mailbox-xgene-slimpro.c +2 -2
@@ -189,8 +189,8 @@ static int slimpro_mbox_probe(struct platform_device *pdev)int i; ctx =devm_kzalloc (&pdev->dev,sizeof (struct slimpro_mbox ),GFP_KERNEL ); -if (IS_ERR (ctx)) -return PTR_ERR (ctx); +if (!ctx) +return -ENOMEM ;platform_set_drvdata (pdev, ctx);
Signature · 1 line
2.1.4
2016-03-21 20:12 GMT+08:00 Axel Lin <[email protected]>:
Quoted 1 line
devm_kzalloc()returns NULL on failure.
Hi,
I'm wondering if this trivial fix is lost.
Should I resend it?