mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2024-09-29 13:53:33 +00:00
mailbox: xgene-slimpro: Fix wrong test for devm_kzalloc
devm_kzalloc() returns NULL on failure. Signed-off-by: Axel Lin <axel.lin@ingics.com> Signed-off-by: Jassi Brar <jaswinder.singh@linaro.org>
This commit is contained in:
parent
3c9688876a
commit
a61b37ead5
1 changed files with 2 additions and 2 deletions
|
@ -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);
|
||||
|
||||
|
|
Loading…
Reference in a new issue