aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/char/msm_smd_pkt.c
diff options
context:
space:
mode:
authorThomas Meyer <thomas@m3y3r.de>2011-08-25 18:59:09 -0400
committerLinus Torvalds <torvalds@linux-foundation.org>2011-08-25 19:25:33 -0400
commit7e8aa048989bf7e0604996a3e2068fb1a81f81bd (patch)
tree58defa5a56ffa54b2a95fc857be487d318bf4dd3 /drivers/char/msm_smd_pkt.c
parent30ecad51849ae132dc6ef6ddb62d499c7257515b (diff)
drivers/char/msm_smd_pkt.c: don't use IS_ERR()
The various basic memory allocation function return NULL, not an ERR_PTR. The semantic patch that makes this change is available in scripts/coccinelle/null/eno.cocci. More information about semantic patching is available at http://coccinelle.lip6.fr/ Signed-off-by: Thomas Meyer <thomas@m3y3r.de> Cc: Niranjana Vishwanathapura <nvishwan@codeaurora.org> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'drivers/char/msm_smd_pkt.c')
-rw-r--r--drivers/char/msm_smd_pkt.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/drivers/char/msm_smd_pkt.c b/drivers/char/msm_smd_pkt.c
index b6f8a65c9960..8eca55deb3a3 100644
--- a/drivers/char/msm_smd_pkt.c
+++ b/drivers/char/msm_smd_pkt.c
@@ -379,9 +379,8 @@ static int __init smd_pkt_init(void)
379 for (i = 0; i < NUM_SMD_PKT_PORTS; ++i) { 379 for (i = 0; i < NUM_SMD_PKT_PORTS; ++i) {
380 smd_pkt_devp[i] = kzalloc(sizeof(struct smd_pkt_dev), 380 smd_pkt_devp[i] = kzalloc(sizeof(struct smd_pkt_dev),
381 GFP_KERNEL); 381 GFP_KERNEL);
382 if (IS_ERR(smd_pkt_devp[i])) { 382 if (!smd_pkt_devp[i]) {
383 r = PTR_ERR(smd_pkt_devp[i]); 383 pr_err("kmalloc() failed\n");
384 pr_err("kmalloc() failed %d\n", r);
385 goto clean_cdevs; 384 goto clean_cdevs;
386 } 385 }
387 386