Commit cefc10d0 authored by Minghao Chi's avatar Minghao Chi Committed by Mauro Carvalho Chehab
Browse files

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: default avatarZeal Robot <zealci@zte.com.cn>
Signed-off-by: default avatarMinghao Chi <chi.minghao@zte.com.cn>
Acked-by: default avatarMatthias Schwarzott <zzam@gentoo.org>
Signed-off-by: default avatarMauro Carvalho Chehab <mchehab@kernel.org>
parent f62dc8f6
Loading
Loading
Loading
Loading
+2 −4
Original line number Diff line number Diff line
@@ -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;
	}

	return ret;
}