diff options
| author | Axel Lin <axel.lin@ingics.com> | 2016-03-21 08:12:20 -0400 |
|---|---|---|
| committer | Jassi Brar <jaswinder.singh@linaro.org> | 2016-04-08 00:00:11 -0400 |
| commit | a61b37ead51488e321fe559a4edd0325c6d4c937 (patch) | |
| tree | af81cd412d9470b440b7aac283dd4b1a103b39f5 /drivers/mailbox | |
| parent | 3c9688876ace9ca4cd8630e5fbba8bb28235990a (diff) | |
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>
Diffstat (limited to 'drivers/mailbox')
| -rw-r--r-- | drivers/mailbox/mailbox-xgene-slimpro.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/mailbox/mailbox-xgene-slimpro.c b/drivers/mailbox/mailbox-xgene-slimpro.c index bd07f39f0692..dd2afbca51c9 100644 --- a/drivers/mailbox/mailbox-xgene-slimpro.c +++ b/drivers/mailbox/mailbox-xgene-slimpro.c | |||
| @@ -189,8 +189,8 @@ static int slimpro_mbox_probe(struct platform_device *pdev) | |||
| 189 | int i; | 189 | int i; |
| 190 | 190 | ||
| 191 | ctx = devm_kzalloc(&pdev->dev, sizeof(struct slimpro_mbox), GFP_KERNEL); | 191 | ctx = devm_kzalloc(&pdev->dev, sizeof(struct slimpro_mbox), GFP_KERNEL); |
| 192 | if (IS_ERR(ctx)) | 192 | if (!ctx) |
| 193 | return PTR_ERR(ctx); | 193 | return -ENOMEM; |
| 194 | 194 | ||
| 195 | platform_set_drvdata(pdev, ctx); | 195 | platform_set_drvdata(pdev, ctx); |
| 196 | 196 | ||
