public inbox for kernel-janitors@vger.kernel.org
 help / color / mirror / Atom feed
* [patch] nfc: NULL vs zero in nci_activate_target()
@ 2012-01-26  6:13 Dan Carpenter
  2012-01-26  6:36 ` drivers: Use NULL not zero for pointer Joe Perches
  2012-01-26 20:23 ` [patch] nfc: NULL vs zero in nci_activate_target() Samuel Ortiz
  0 siblings, 2 replies; 9+ messages in thread
From: Dan Carpenter @ 2012-01-26  6:13 UTC (permalink / raw)
  To: Lauro Ramos Venancio
  Cc: Aloisio Almeida Jr, Samuel Ortiz, David S. Miller,
	John W. Linville, Ilan Elias, linux-wireless, netdev,
	kernel-janitors

This is a pointer so it should be NULL instead of zero.  Sparse
complains about this stuff:
net/nfc/nci/core.c:447:37: warning: Using plain integer as NULL pointer

Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>

diff --git a/net/nfc/nci/core.c b/net/nfc/nci/core.c
index 12d1d4d..a47e90c 100644
--- a/net/nfc/nci/core.c
+++ b/net/nfc/nci/core.c
@@ -444,7 +444,7 @@ static int nci_activate_target(struct nfc_dev *nfc_dev, __u32 target_idx,
 {
 	struct nci_dev *ndev = nfc_get_drvdata(nfc_dev);
 	struct nci_rf_discover_select_param param;
-	struct nfc_target *target = 0;
+	struct nfc_target *target = NULL;
 	int i;
 	int rc = 0;
 

^ permalink raw reply related	[flat|nested] 9+ messages in thread

end of thread, other threads:[~2012-01-27 23:21 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-01-26  6:13 [patch] nfc: NULL vs zero in nci_activate_target() Dan Carpenter
2012-01-26  6:36 ` drivers: Use NULL not zero for pointer Joe Perches
2012-01-27  5:33   ` [PATCH next V2] drivers: Use NULL not zero pointer assignments Joe Perches
2012-01-27  6:20     ` Ryan Mallon
2012-01-27  7:38       ` Joe Perches
2012-01-27 22:27         ` Ryan Mallon
2012-01-27 22:46           ` Julia Lawall
2012-01-27 23:21             ` Ryan Mallon
2012-01-26 20:23 ` [patch] nfc: NULL vs zero in nci_activate_target() Samuel Ortiz

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox