提交 a61b37ea 编写于 作者: A Axel Lin 提交者: Jassi Brar

mailbox: xgene-slimpro: Fix wrong test for devm_kzalloc

devm_kzalloc() returns NULL on failure.
Signed-off-by: NAxel Lin <axel.lin@ingics.com>
Signed-off-by: NJassi Brar <jaswinder.singh@linaro.org>
上级 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% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册