aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorColin Ian King <colin.king@canonical.com>2015-09-15 08:42:27 -0300
committerMauro Carvalho Chehab <mchehab@osg.samsung.com>2015-10-03 10:24:18 -0300
commit69b82668ec1714c44245a7f93fe83db3c93b3522 (patch)
treec5d90909a01782ca39991d8d8a603111464b9bd2
parent92cdd090c304287da2c49ca1f4e094818c6f372d (diff)
[media] c8sectpfe: fix ininitialized error return on firmware load failure
static analysis with cppcheck detected the following error: [drivers/media/platform/sti/c8sectpfe/c8sectpfe-core.c:1210]: (error) Uninitialized variable: ret ret is never initialised, so garbage is being returned. Instead return the error return from the call of request_firmware_nowait Signed-off-by: Colin Ian King <colin.king@canonical.com>
-rw-r--r--drivers/media/platform/sti/c8sectpfe/c8sectpfe-core.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/drivers/media/platform/sti/c8sectpfe/c8sectpfe-core.c b/drivers/media/platform/sti/c8sectpfe/c8sectpfe-core.c
index 1586a1e6836d..db4d2cf28885 100644
--- a/drivers/media/platform/sti/c8sectpfe/c8sectpfe-core.c
+++ b/drivers/media/platform/sti/c8sectpfe/c8sectpfe-core.c
@@ -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;

Privacy Policy