From: Sudip Mukherjee Date: Thu, 2 Jun 2016 13:32:55 +0000 (-0300) Subject: [media] c8sectpfe: fix memory leak X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=25f1ec2462f4afe544c9374ef4dbb4f5f0a3b701;p=GitHub%2Fmoto-9609%2Fandroid_kernel_motorola_exynos9610.git [media] c8sectpfe: fix memory leak We have assigned memory while requesting the firmware but if the sanity check fails then we are not releasing the firmware. Signed-off-by: Sudip Mukherjee Signed-off-by: Mauro Carvalho Chehab --- diff --git a/drivers/media/platform/sti/c8sectpfe/c8sectpfe-core.c b/drivers/media/platform/sti/c8sectpfe/c8sectpfe-core.c index 7dddf77a62cf..30c148b9d65e 100644 --- a/drivers/media/platform/sti/c8sectpfe/c8sectpfe-core.c +++ b/drivers/media/platform/sti/c8sectpfe/c8sectpfe-core.c @@ -1161,6 +1161,7 @@ static int load_c8sectpfe_fw(struct c8sectpfei *fei) if (err) { dev_err(fei->dev, "c8sectpfe_elf_sanity_check failed err=(%d)\n" , err); + release_firmware(fw); return err; }