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>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <e8f8fc26-1853-d8ab-bc1b-a8cc2474bb6f@xs4all.nl>
Date:   Tue, 23 May 2023 13:36:50 +0200
From:   Hans Verkuil <hverkuil@...all.nl>
To:     Anup Sharma <anupnewsmail@...il.com>, mchehab@...nel.org,
        gregkh@...uxfoundation.org
Cc:     linux-media@...r.kernel.org, devel@...verdev.osuosl.org,
        linux-kernel@...r.kernel.org
Subject: Re: [PATCH] staging: media: usbvision: Remove comparision to NULL

Hi Anup,

On 02/05/2023 03:05, Anup Sharma wrote:
> Remove comparison to null in file usbvision-core.c and usbvision-i2c.c.
> 
> Signed-off-by: Anup Sharma <anupnewsmail@...il.com>
> ---
>  drivers/staging/media/usbvision/usbvision-core.c | 8 ++++----
>  drivers/staging/media/usbvision/usbvision-i2c.c  | 2 +-
>  2 files changed, 5 insertions(+), 5 deletions(-)

The usbvision driver has been removed almost 2 years ago, so this patch is for
a really old kernel.

Rather odd, but in any case, I'm rejecting this patch for obvious reasons...

Regards,

	Hans

> 
> diff --git a/drivers/staging/media/usbvision/usbvision-core.c b/drivers/staging/media/usbvision/usbvision-core.c
> index e35dee35b068..a38104b2a0f9 100644
> --- a/drivers/staging/media/usbvision/usbvision-core.c
> +++ b/drivers/staging/media/usbvision/usbvision-core.c
> @@ -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 */
> diff --git a/drivers/staging/media/usbvision/usbvision-i2c.c b/drivers/staging/media/usbvision/usbvision-i2c.c
> index 6e4df3335b1b..3bba93293463 100644
> --- a/drivers/staging/media/usbvision/usbvision-i2c.c
> +++ b/drivers/staging/media/usbvision/usbvision-i2c.c
> @@ -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;

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ