aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/media/video/saa7164/saa7164-bus.c
diff options
context:
space:
mode:
authorPeter Huewe <PeterHuewe@gmx.de>2011-01-30 14:33:01 -0500
committerMauro Carvalho Chehab <mchehab@redhat.com>2011-03-21 19:32:19 -0400
commit61ca1500c5ee04f2be34a4f58bb9baed0214b7a9 (patch)
treeef71d383209c305352710cfac4a34fe068886af6 /drivers/media/video/saa7164/saa7164-bus.c
parent7ee9e64a3d7379fd443090880158374181f754cf (diff)
[media] video/saa7164: Fix sparse warning: Using plain integer as NULL pointer
This patch fixes the warning "Using plain integer as NULL pointer", generated by sparse, by replacing if (var == 0) with if (!var) after an allocation and all other offending 0s with NULL. KernelVersion: linus' tree-1f0324c Signed-off-by: Peter Huewe <peterhuewe@gmx.de> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Diffstat (limited to 'drivers/media/video/saa7164/saa7164-bus.c')
-rw-r--r--drivers/media/video/saa7164/saa7164-bus.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/drivers/media/video/saa7164/saa7164-bus.c b/drivers/media/video/saa7164/saa7164-bus.c
index b2b0d97101d0..466e1b02f91f 100644
--- a/drivers/media/video/saa7164/saa7164-bus.c
+++ b/drivers/media/video/saa7164/saa7164-bus.c
@@ -158,7 +158,7 @@ int saa7164_bus_set(struct saa7164_dev *dev, struct tmComResInfo* msg,
158 return SAA_ERR_BAD_PARAMETER; 158 return SAA_ERR_BAD_PARAMETER;
159 } 159 }
160 160
161 if ((msg->size > 0) && (buf == 0)) { 161 if ((msg->size > 0) && (buf == NULL)) {
162 printk(KERN_ERR "%s() Missing message buffer\n", __func__); 162 printk(KERN_ERR "%s() Missing message buffer\n", __func__);
163 return SAA_ERR_BAD_PARAMETER; 163 return SAA_ERR_BAD_PARAMETER;
164 } 164 }
@@ -315,7 +315,7 @@ int saa7164_bus_get(struct saa7164_dev *dev, struct tmComResInfo* msg,
315 315
316 saa7164_bus_verify(dev); 316 saa7164_bus_verify(dev);
317 317
318 if (msg == 0) 318 if (msg == NULL)
319 return ret; 319 return ret;
320 320
321 if (msg->size > dev->bus.m_wMaxReqSize) { 321 if (msg->size > dev->bus.m_wMaxReqSize) {
@@ -324,7 +324,7 @@ int saa7164_bus_get(struct saa7164_dev *dev, struct tmComResInfo* msg,
324 return ret; 324 return ret;
325 } 325 }
326 326
327 if ((peekonly == 0) && (msg->size > 0) && (buf == 0)) { 327 if ((peekonly == 0) && (msg->size > 0) && (buf == NULL)) {
328 printk(KERN_ERR 328 printk(KERN_ERR
329 "%s() Missing msg buf, size should be %d bytes\n", 329 "%s() Missing msg buf, size should be %d bytes\n",
330 __func__, msg->size); 330 __func__, msg->size);
@@ -392,7 +392,7 @@ int saa7164_bus_get(struct saa7164_dev *dev, struct tmComResInfo* msg,
392 392
393 printk(KERN_ERR "%s() Unexpected msg miss-match\n", __func__); 393 printk(KERN_ERR "%s() Unexpected msg miss-match\n", __func__);
394 saa7164_bus_dumpmsg(dev, msg, buf); 394 saa7164_bus_dumpmsg(dev, msg, buf);
395 saa7164_bus_dumpmsg(dev, &msg_tmp, 0); 395 saa7164_bus_dumpmsg(dev, &msg_tmp, NULL);
396 ret = SAA_ERR_INVALID_COMMAND; 396 ret = SAA_ERR_INVALID_COMMAND;
397 goto out; 397 goto out;
398 } 398 }