[PATCH 1/2] [media] c8sectpfe: initialize err in load_slim_core_fw

From: Nicolas Iooss
Date: Sun Sep 20 2015 - 10:14:50 EST


load_slim_core_fw() uses a for loop with !err in its condition without
first initializing err. Fix this by setting err to 0 in its definition.

Signed-off-by: Nicolas Iooss <nicolas.iooss_linux@xxxxxxx>
---
drivers/media/platform/sti/c8sectpfe/c8sectpfe-core.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/media/platform/sti/c8sectpfe/c8sectpfe-core.c b/drivers/media/platform/sti/c8sectpfe/c8sectpfe-core.c
index 486aef50d99b..a424339b18bc 100644
--- a/drivers/media/platform/sti/c8sectpfe/c8sectpfe-core.c
+++ b/drivers/media/platform/sti/c8sectpfe/c8sectpfe-core.c
@@ -1097,7 +1097,7 @@ static int load_slim_core_fw(const struct firmware *fw, void *context)
Elf32_Ehdr *ehdr;
Elf32_Phdr *phdr;
u8 __iomem *dst;
- int err, i;
+ int err = 0, i;

if (!fw || !context)
return -EINVAL;
--
2.5.2

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/