Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

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

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
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -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);