summaryrefslogtreecommitdiffstats
path: root/drivers/media/i2c/tc358743.c
diff options
context:
space:
mode:
authorDan Carpenter <dan.carpenter@oracle.com>2017-09-28 15:03:54 +0200
committerMauro Carvalho Chehab <mchehab@osg.samsung.com>2017-10-27 14:14:13 +0200
commit7996e5c47fc01ca4bd94b40ba4585054f1d69b0e (patch)
tree96ce8229f8920e267436ff0a7336479c2087857d /drivers/media/i2c/tc358743.c
parentmedia: au0828/em28xx: make vb2_ops const (diff)
downloadlinux-7996e5c47fc01ca4bd94b40ba4585054f1d69b0e.tar.xz
linux-7996e5c47fc01ca4bd94b40ba4585054f1d69b0e.zip
media: tc358743: remove an unneeded condition
We can remove the check for if "state->cec_adap" is NULL. The cec_allocate_adapter() function never returns NULL and also we verified that "state->cec_adap" is an error pointer. Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com> Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
Diffstat (limited to 'drivers/media/i2c/tc358743.c')
-rw-r--r--drivers/media/i2c/tc358743.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/media/i2c/tc358743.c b/drivers/media/i2c/tc358743.c
index 6c59a460647f..cd995e6a98ef 100644
--- a/drivers/media/i2c/tc358743.c
+++ b/drivers/media/i2c/tc358743.c
@@ -2122,7 +2122,7 @@ static int tc358743_probe(struct i2c_client *client,
state, dev_name(&client->dev),
CEC_CAP_DEFAULTS | CEC_CAP_MONITOR_ALL, CEC_MAX_LOG_ADDRS);
if (IS_ERR(state->cec_adap)) {
- err = state->cec_adap ? PTR_ERR(state->cec_adap) : -ENOMEM;
+ err = PTR_ERR(state->cec_adap);
goto err_hdl;
}
irq_mask |= MASK_CEC_RMSK | MASK_CEC_TMSK;