Skip to contentSkip to conversation

ks7010_sdio:Fix checkpatch out of memory warning

PATCH In review RAGHU Halharvi 2 participants 3 messages Jul 15, 2018 – Jul 16, 2018 Staging

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 ks7010_sdio:Fix checkpatch out of memory warning

* Patch fixes checkpatch warning "Possible unnecessary 'out of memory' message"

---
 drivers/staging/ks7010/ks7010_sdio.c | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)
drivers/staging/ks7010/ks7010_sdio.c +1 -3
index b8f55a11ee1c..972b01a0257d 100644
@@ -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);
Signature · 1 line
2.17.1
maintainer
#1 lore raw
Quoted 4 lines · RAGHU Halharvi

* Patch fixes checkpatch warning "Possible unnecessary 'out of memory' message"

Next time please put "staging:" in the subject line, as a prefix, like all other patches for this driver have.

thanks,

greg k-h

maintainer
#2 lore raw

Re: [PATCH] staging: ks7010_sdio:Fix checkpatch out of memory warning

In reply to RAGHU Halharvi
Quoted 13 lines · RAGHU Halharvi

* Patch fixes checkpatch warning "Possible unnecessary 'out of memory' message"

---
 drivers/staging/ks7010/ks7010_sdio.c | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)
drivers/staging/ks7010/ks7010_sdio.c +0 -0
index b8f55a11ee1c..972b01a0257d 100644

drivers/staging/ks7010/ks7010_sdio.c static int send_stop_request(struct sdio_func *func) · line 963

Quoted 8 lines
drivers/staging/ks7010/ks7010_sdio.c +1 -3
@@ -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;
-	}

This change has already been done in my tree, please always work against linux-next at the least, and ideally staging.git, so that you do not duplicate work others have already done.

thanks,

greg k-h