projects
/
linux-2.6-microblaze.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
3c96888
)
mailbox: xgene-slimpro: Fix wrong test for devm_kzalloc
author
Axel Lin
<axel.lin@ingics.com>
Mon, 21 Mar 2016 12:12:20 +0000
(20:12 +0800)
committer
Jassi Brar
<jaswinder.singh@linaro.org>
Fri, 8 Apr 2016 04:00:11 +0000
(09:30 +0530)
devm_kzalloc() returns NULL on failure.
Signed-off-by: Axel Lin <axel.lin@ingics.com>
Signed-off-by: Jassi Brar <jaswinder.singh@linaro.org>
drivers/mailbox/mailbox-xgene-slimpro.c
patch
|
blob
|
history
diff --git
a/drivers/mailbox/mailbox-xgene-slimpro.c
b/drivers/mailbox/mailbox-xgene-slimpro.c
index
bd07f39
..
dd2afbc
100644
(file)
--- 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)
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);