lkml.org 
[lkml]   [2015]   [Sep]   [20]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
From
Subject[PATCH 1/2] [media] c8sectpfe: initialize err in load_slim_core_fw
Date
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@m4x.org>
---
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


\
 
 \ /
  Last update: 2015-09-20 16:21    [W:0.036 / U:1.116 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site