summaryrefslogtreecommitdiffstats
path: root/drivers/media/platform/sti/c8sectpfe/c8sectpfe-core.c
diff options
context:
space:
mode:
authorDavid S. Miller <davem@davemloft.net>2015-11-01 00:15:30 -0400
committerDavid S. Miller <davem@davemloft.net>2015-11-01 00:15:30 -0400
commitb75ec3af27bf011a760e2f44eb25a99b6fbb0fb3 (patch)
tree89f4fbab2c6194b32a46eb771c4b158585bf0bb5 /drivers/media/platform/sti/c8sectpfe/c8sectpfe-core.c
parente7b63ff115f21ea6c609cbb08f3d489af627af6e (diff)
parent523e13455ec9ec4457a5a1d24ff7132949742b70 (diff)
downloadlinux-stable-b75ec3af27bf011a760e2f44eb25a99b6fbb0fb3.tar.gz
linux-stable-b75ec3af27bf011a760e2f44eb25a99b6fbb0fb3.tar.bz2
linux-stable-b75ec3af27bf011a760e2f44eb25a99b6fbb0fb3.zip
Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net
Diffstat (limited to 'drivers/media/platform/sti/c8sectpfe/c8sectpfe-core.c')
-rw-r--r--drivers/media/platform/sti/c8sectpfe/c8sectpfe-core.c7
1 files changed, 3 insertions, 4 deletions
diff --git a/drivers/media/platform/sti/c8sectpfe/c8sectpfe-core.c b/drivers/media/platform/sti/c8sectpfe/c8sectpfe-core.c
index 486aef50d99b..f922f2e827bc 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;
@@ -1106,7 +1106,7 @@ static int load_slim_core_fw(const struct firmware *fw, void *context)
phdr = (Elf32_Phdr *)(fw->data + ehdr->e_phoff);
/* go through the available ELF segments */
- for (i = 0; i < ehdr->e_phnum && !err; i++, phdr++) {
+ for (i = 0; i < ehdr->e_phnum; i++, phdr++) {
/* Only consider LOAD segments */
if (phdr->p_type != PT_LOAD)
@@ -1192,7 +1192,6 @@ err:
static int load_c8sectpfe_fw_step1(struct c8sectpfei *fei)
{
- int ret;
int err;
dev_info(fei->dev, "Loading firmware: %s\n", FIRMWARE_MEMDMA);
@@ -1207,7 +1206,7 @@ static int load_c8sectpfe_fw_step1(struct c8sectpfei *fei)
if (err) {
dev_err(fei->dev, "request_firmware_nowait err: %d.\n", err);
complete_all(&fei->fw_ack);
- return ret;
+ return err;
}
return 0;