* [PATCH 1/2] staging: media: cxd2099: fix sparse warnings in cxd2099_attach
@ 2012-08-04 18:12 Devendra Naga
0 siblings, 0 replies; only message in thread
From: Devendra Naga @ 2012-08-04 18:12 UTC (permalink / raw)
To: Mauro Carvalho Chehab, linux-media, devel, linux-kernel; +Cc: Devendra Naga
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@gmail.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
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2012-08-04 18:12 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-08-04 18:12 [PATCH 1/2] staging: media: cxd2099: fix sparse warnings in cxd2099_attach Devendra Naga
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®