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>
This commit is contained in:
parent
f62dc8f6bf
commit
cefc10d0d9
@ -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;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user