Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1228892
| From | Nicolas Iooss <nicolas.iooss_linux@m4x.org> |
|---|---|
| Newsgroups | linux.kernel |
| Subject | [PATCH 1/2] [media] c8sectpfe: initialize err in load_slim_core_fw |
| Date | 2015-09-20 16:20 +0200 |
| Message-ID | <qaNDb-2fl-7@gated-at.bofh.it> (permalink) |
| Organization | linux.* mail to news gateway |
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 -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
Back to linux.kernel | Previous | Next | Find similar | Unroll thread
[PATCH 1/2] [media] c8sectpfe: initialize err in load_slim_core_fw Nicolas Iooss <nicolas.iooss_linux@m4x.org> - 2015-09-20 16:20 +0200
csiph-web