lkml.org 
[lkml]   [2018]   [Jul]   [15]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
From
Subject[PATCH] ks7010_sdio:Fix checkpatch out of memory warning
Date
* Patch fixes checkpatch warning "Possible unnecessary 'out of memory'
message"

Signed-off-by: RAGHU Halharvi <raghuhack78@gmail.com>
---
drivers/staging/ks7010/ks7010_sdio.c | 4 +---
1 file changed, 1 insertion(+), 3 deletions(-)

diff --git a/drivers/staging/ks7010/ks7010_sdio.c b/drivers/staging/ks7010/ks7010_sdio.c
index b8f55a11ee1c..972b01a0257d 100644
--- a/drivers/staging/ks7010/ks7010_sdio.c
+++ b/drivers/staging/ks7010/ks7010_sdio.c
@@ -957,10 +957,8 @@ static int send_stop_request(struct sdio_func *func)
card = sdio_get_drvdata(func);

pp = kzalloc(hif_align_size(sizeof(*pp)), GFP_KERNEL);
- if (!pp) {
- netdev_err(card->priv->net_dev, "allocate memory failed..\n");
+ if (!pp)
return -ENOMEM;
- }

size = sizeof(*pp) - sizeof(pp->header.size);
pp->header.size = cpu_to_le16((uint16_t)size);
--
2.17.1
\
 
 \ /
  Last update: 2018-07-15 22:07    [W:0.035 / U:3.228 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site