lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [day] [month] [year] [list]
Date:	Sat,  4 Aug 2012 23:57:03 +0545
From:	Devendra Naga <develkernel412222@...il.com>
To:	Mauro Carvalho Chehab <mchehab@...radead.org>,
	linux-media@...r.kernel.org, devel@...verdev.osuosl.org,
	linux-kernel@...r.kernel.org
Cc:	Devendra Naga <develkernel412222@...il.com>
Subject: [PATCH 1/2] staging: media: cxd2099: fix sparse warnings in cxd2099_attach

The following sparse warnings were fixed

drivers/staging/media/cxd2099/cxd2099.c:686:26: warning: Using plain integer as NULL pointer
drivers/staging/media/cxd2099/cxd2099.c:691:24: warning: Using plain integer as NULL pointer
drivers/staging/media/cxd2099/cxd2099.c:696:24: warning: Using plain integer as NULL pointer

Signed-off-by: Devendra Naga <develkernel412222@...il.com>
---
 drivers/staging/media/cxd2099/cxd2099.c |    6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/drivers/staging/media/cxd2099/cxd2099.c b/drivers/staging/media/cxd2099/cxd2099.c
index 1c04185..1678503 100644
--- a/drivers/staging/media/cxd2099/cxd2099.c
+++ b/drivers/staging/media/cxd2099/cxd2099.c
@@ -683,17 +683,17 @@ struct dvb_ca_en50221 *cxd2099_attach(struct cxd2099_cfg *cfg,
 				      void *priv,
 				      struct i2c_adapter *i2c)
 {
-	struct cxd *ci = 0;
+	struct cxd *ci;
 	u8 val;
 
 	if (i2c_read_reg(i2c, cfg->adr, 0, &val) < 0) {
 		printk(KERN_INFO "No CXD2099 detected at %02x\n", cfg->adr);
-		return 0;
+		return NULL;
 	}
 
 	ci = kmalloc(sizeof(struct cxd), GFP_KERNEL);
 	if (!ci)
-		return 0;
+		return NULL;
 	memset(ci, 0, sizeof(*ci));
 
 	mutex_init(&ci->lock);
-- 
1.7.9.5

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists