Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Skip to content
Commit 4ae2e594 authored by Jesper Juhl's avatar Jesper Juhl Committed by Mauro Carvalho Chehab
Browse files

[media] staging/media/as102: Don't call release_firmware() on uninitialized variable



If, in drivers/staging/media/as102/as102_fw.c::as102_fw_upload(), the call
	cmd_buf = kzalloc(MAX_FW_PKT_SIZE, GFP_KERNEL);
should fail and return NULL so that we jump to the 'error:' label,
then we'll end up calling 'release_firmware(firmware);' with
'firmware' still uninitialized - not good.

The easy fix is to just initialize 'firmware' to NULL when we declare
it, since release_firmware() deals gracefully with being passed NULL
pointers.

Signed-off-by: default avatarJesper Juhl <jj@chaosbits.net>
Signed-off-by: default avatarMauro Carvalho Chehab <mchehab@redhat.com>
parent 96371fc8
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment