summaryrefslogtreecommitdiffstats
path: root/drivers/media
diff options
context:
space:
mode:
authorMauro Carvalho Chehab <mchehab+samsung@kernel.org>2019-03-25 16:32:19 -0400
committerMauro Carvalho Chehab <mchehab+samsung@kernel.org>2019-03-25 18:02:30 -0400
commit1021cd56772b636ebccc3941c44094ef6b0fac4e (patch)
treeaa3969800b5f1bcc93eb05da7b77c99bbbcb5d5a /drivers/media
parent4f777d011bdd9e78fcf02701e89c8be457504a6c (diff)
downloadlinux-stable-1021cd56772b636ebccc3941c44094ef6b0fac4e.tar.gz
linux-stable-1021cd56772b636ebccc3941c44094ef6b0fac4e.tar.bz2
linux-stable-1021cd56772b636ebccc3941c44094ef6b0fac4e.zip
media: sti/delta: remove uneeded check
At the error logic, ipc_buf was already asigned to &ctx->ipc_buf_struct, with can't be null, as warned by smatch: drivers/media/platform/sti/delta/delta-ipc.c:223 delta_ipc_open() warn: variable dereferenced before check 'ctx->ipc_buf' (see line 183) So, remove the uneeded check. Signed-off-by: Mauro Carvalho Chehab <mchehab+samsung@kernel.org>
Diffstat (limited to 'drivers/media')
-rw-r--r--drivers/media/platform/sti/delta/delta-ipc.c6
1 files changed, 2 insertions, 4 deletions
diff --git a/drivers/media/platform/sti/delta/delta-ipc.c b/drivers/media/platform/sti/delta/delta-ipc.c
index a4603d573c34..186d88f02ecd 100644
--- a/drivers/media/platform/sti/delta/delta-ipc.c
+++ b/drivers/media/platform/sti/delta/delta-ipc.c
@@ -220,10 +220,8 @@ int delta_ipc_open(struct delta_ctx *pctx, const char *name,
err:
pctx->sys_errors++;
- if (ctx->ipc_buf) {
- hw_free(pctx, ctx->ipc_buf);
- ctx->ipc_buf = NULL;
- }
+ hw_free(pctx, ctx->ipc_buf);
+ ctx->ipc_buf = NULL;
return ret;
};