Commit a61b37ea authored by Axel Lin's avatar Axel Lin Committed by Jassi Brar

mailbox: xgene-slimpro: Fix wrong test for devm_kzalloc

devm_kzalloc() returns NULL on failure.
Signed-off-by: default avatarAxel Lin <axel.lin@ingics.com>
Signed-off-by: default avatarJassi Brar <jaswinder.singh@linaro.org>
parent 3c968887
......@@ -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);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment