diff options
author | Minghao Chi <chi.minghao@zte.com.cn> | 2022-06-06 03:44:33 +0200 |
---|---|---|
committer | Mauro Carvalho Chehab <mchehab@kernel.org> | 2024-04-29 13:26:56 +0200 |
commit | cefc10d0d9164eb2f62e789b69dc658dc851eb58 (patch) | |
tree | 6df69ed07b2433c49ef893dcd8ec40f305349d54 /drivers/media | |
parent | media: flexcop-usb: fix sanity check of bNumEndpoints (diff) | |
download | linux-cefc10d0d9164eb2f62e789b69dc658dc851eb58.tar.xz linux-cefc10d0d9164eb2f62e789b69dc658dc851eb58.zip |
media: si2165: Remove redundant NULL check before release_firmware() call
release_firmware() checks for NULL pointers internally so checking
before calling it is redundant.
Link: https://lore.kernel.org/linux-media/20220606014433.290667-1-chi.minghao@zte.com.cn
Reported-by: Zeal Robot <zealci@zte.com.cn>
Signed-off-by: Minghao Chi <chi.minghao@zte.com.cn>
Acked-by: Matthias Schwarzott <zzam@gentoo.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@kernel.org>
Diffstat (limited to 'drivers/media')
-rw-r--r-- | drivers/media/dvb-frontends/si2165.c | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/drivers/media/dvb-frontends/si2165.c b/drivers/media/dvb-frontends/si2165.c index 434d003bf397..013d423d3263 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; } |