mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: zzam@gentoo.org
To: cgel.zte@gmail.com
Cc: mchehab@kernel.org, linux-media@vger.kernel.org,
	linux-kernel@vger.kernel.org,
	Minghao Chi <chi.minghao@zte.com.cn>,
	Zeal Robot <zealci@zte.com.cn>
Subject: Re: [PATCH] [media] si2165: Remove redundant NULL check before release_firmware() call
Date: Mon, 21 Nov 2022 21:25:48 +0100	[thread overview]
Message-ID: <414c8bf5-f2ce-e042-05ff-0e463ab2613f@gentoo.org> (raw)
In-Reply-To: <20220606014433.290667-1-chi.minghao@zte.com.cn>

Am 06.06.22 um 03:44 schrieb cgel.zte@gmail.com:
> From: Minghao Chi <chi.minghao@zte.com.cn>
> 
> release_firmware() checks for NULL pointers internally so checking
> before calling it is redundant.
> 
> Reported-by: Zeal Robot <zealci@zte.com.cn>
> Signed-off-by: Minghao Chi <chi.minghao@zte.com.cn>
> ---
>   drivers/media/dvb-frontends/si2165.c | 6 ++----
>   1 file changed, 2 insertions(+), 4 deletions(-)
> 
> diff --git a/drivers/media/dvb-frontends/si2165.c b/drivers/media/dvb-frontends/si2165.c
> index ebee230afb7b..3d167ca670a4 100644
> --- a/drivers/media/dvb-frontends/si2165.c
> +++ b/drivers/media/dvb-frontends/si2165.c
> @@ -513,10 +513,8 @@ static int si2165_upload_firmware(struct si2165_state *state)
>   	ret = 0;
>   	state->firmware_loaded = true;
>   error:
> -	if (fw) {
> -		release_firmware(fw);
> -		fw = NULL;
> -	}
> +	release_firmware(fw);
> +	fw = NULL;
>   
>   	return ret;
>   }

Acked-by: Matthias Schwarzott <zzam@gentoo.org>


      reply	other threads:[~2022-11-21 20:26 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-06-06  1:44 cgel.zte
2022-11-21 20:25 ` zzam [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=414c8bf5-f2ce-e042-05ff-0e463ab2613f@gentoo.org \
    --to=zzam@gentoo.org \
    --cc=cgel.zte@gmail.com \
    --cc=chi.minghao@zte.com.cn \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-media@vger.kernel.org \
    --cc=mchehab@kernel.org \
    --cc=zealci@zte.com.cn \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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®