Commit 19f8accf authored by Axel Lin's avatar Axel Lin Committed by Luis Henriques

mailbox: xgene-slimpro: Fix wrong test for devm_kzalloc

BugLink: https://launchpad.net/bugs/1625232

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>
(cherry picked from commit a61b37ea)
Signed-off-by: default avatarCraig Magina <craig.magina@canonical.com>
Acked-by: default avatarSeth Forshee <seth.forshee@canonical.com>
Signed-off-by: default avatarTim Gardner <tim.gardner@canonical.com>
parent e69883b7
......@@ -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