@@ -349,7 +349,7 @@ int usbvision_scratch_alloc(struct usb_usbvision *usbvision)
{
usbvision->scratch = vmalloc_32(scratch_buf_size);
scratch_reset(usbvision);
- if (usbvision->scratch == NULL) {
+ if (!usbvision->scratch) {
dev_err(&usbvision->dev->dev,
"%s: unable to allocate %d bytes for scratch\n",
__func__, scratch_buf_size);
@@ -374,7 +374,7 @@ int usbvision_decompress_alloc(struct usb_usbvision *usbvision)
int IFB_size = MAX_FRAME_WIDTH * MAX_FRAME_HEIGHT * 3 / 2;
usbvision->intra_frame_buffer = vmalloc_32(IFB_size);
- if (usbvision->intra_frame_buffer == NULL) {
+ if (!usbvision->intra_frame_buffer) {
dev_err(&usbvision->dev->dev,
"%s: unable to allocate %d for compr. frame buffer\n",
__func__, IFB_size);
@@ -2284,7 +2284,7 @@ int usbvision_init_isoc(struct usb_usbvision *usbvision)
struct urb *urb;
urb = usb_alloc_urb(USBVISION_URB_FRAMES, GFP_KERNEL);
- if (urb == NULL)
+ if (!urb)
return -ENOMEM;
usbvision->sbuf[buf_idx].urb = urb;
usbvision->sbuf[buf_idx].data =
@@ -2343,7 +2343,7 @@ void usbvision_stop_isoc(struct usb_usbvision *usbvision)
int buf_idx, err_code, reg_value;
int sb_size = USBVISION_URB_FRAMES * usbvision->isoc_packet_size;
- if ((usbvision->streaming == stream_off) || (usbvision->dev == NULL))
+ if ((usbvision->streaming == stream_off) || (!usbvision->dev))
return;
/* Unschedule all of the iso td's */
@@ -233,7 +233,7 @@ int usbvision_i2c_register(struct usb_usbvision *usbvision)
&usbvision->i2c_adap,
"tuner", 0, v4l2_i2c_tuner_addrs(type));
- if (sd == NULL)
+ if (!sd)
return -ENODEV;
if (usbvision->tuner_type != -1) {
tun_setup.mode_mask = T_ANALOG_TV | T_RADIO;
Remove comparison to null in file usbvision-core.c and usbvision-i2c.c. Signed-off-by: Anup Sharma <anupnewsmail@gmail.com> --- drivers/staging/media/usbvision/usbvision-core.c | 8 ++++---- drivers/staging/media/usbvision/usbvision-i2c.c | 2 +- 2 files changed, 5 insertions(+), 5 deletions(-)