* [PATCH][next] net: bcmgenet: return NULL rather than 0 for null pointer
@ 2017-07-17 9:07 Colin King
2017-07-17 15:55 ` David Miller
0 siblings, 1 reply; 2+ messages in thread
From: Colin King @ 2017-07-17 9:07 UTC (permalink / raw)
To: Florian Fainelli, netdev; +Cc: kernel-janitors, linux-kernel
From: Colin Ian King <colin.king@canonical.com>
Don't return plain integer 0, instead return NULL
Fixes sparse warning:
warning: Using plain integer as NULL pointer
Signed-off-by: Colin Ian King <colin.king@canonical.com>
---
drivers/net/ethernet/broadcom/genet/bcmgenet.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/net/ethernet/broadcom/genet/bcmgenet.c b/drivers/net/ethernet/broadcom/genet/bcmgenet.c
index 7b0b399aaedd..13a35f504081 100644
--- a/drivers/net/ethernet/broadcom/genet/bcmgenet.c
+++ b/drivers/net/ethernet/broadcom/genet/bcmgenet.c
@@ -1303,7 +1303,7 @@ static struct sk_buff *bcmgenet_free_tx_cb(struct device *dev,
dma_unmap_addr_set(cb, dma_addr, 0);
}
- return 0;
+ return NULL;
}
/* Simple helper to free a receive control block's resources */
--
2.11.0
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH][next] net: bcmgenet: return NULL rather than 0 for null pointer
2017-07-17 9:07 [PATCH][next] net: bcmgenet: return NULL rather than 0 for null pointer Colin King
@ 2017-07-17 15:55 ` David Miller
0 siblings, 0 replies; 2+ messages in thread
From: David Miller @ 2017-07-17 15:55 UTC (permalink / raw)
To: colin.king; +Cc: f.fainelli, netdev, kernel-janitors, linux-kernel
From: Colin King <colin.king@canonical.com>
Date: Mon, 17 Jul 2017 10:07:25 +0100
> From: Colin Ian King <colin.king@canonical.com>
>
> Don't return plain integer 0, instead return NULL
>
> Fixes sparse warning:
> warning: Using plain integer as NULL pointer
>
> Signed-off-by: Colin Ian King <colin.king@canonical.com>
This does not apply cleanly to the net-next tree.
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2017-07-17 15:55 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-07-17 9:07 [PATCH][next] net: bcmgenet: return NULL rather than 0 for null pointer Colin King
2017-07-17 15:55 ` David Miller
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).