diff options
author | Colin Ian King <colin.king@canonical.com> | 2019-08-18 15:36:08 -0300 |
---|---|---|
committer | Mauro Carvalho Chehab <mchehab+samsung@kernel.org> | 2019-08-26 10:43:53 -0300 |
commit | eb0a6fb25c05679d32698c2503ee39bdbbc13663 (patch) | |
tree | e922f2521b186ccce7e9805858d261dd23f63a58 /drivers/media/usb/hdpvr | |
parent | 7e0bb5828311f811309bed5749528ca04992af2f (diff) | |
download | blackbird-op-linux-eb0a6fb25c05679d32698c2503ee39bdbbc13663.tar.gz blackbird-op-linux-eb0a6fb25c05679d32698c2503ee39bdbbc13663.zip |
media: hdpvr: remove redundant assignment to retval
Variable retval is initialized to a value that is never read
so this assignment is redundant. Clean up the code by removing
retval completely and just return the error return from the
call to i2c_add_adapter.
Addresses-Coverity: ("Unused value")
Signed-off-by: Colin Ian King <colin.king@canonical.com>
Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab+samsung@kernel.org>
Diffstat (limited to 'drivers/media/usb/hdpvr')
-rw-r--r-- | drivers/media/usb/hdpvr/hdpvr-i2c.c | 6 |
1 files changed, 1 insertions, 5 deletions
diff --git a/drivers/media/usb/hdpvr/hdpvr-i2c.c b/drivers/media/usb/hdpvr/hdpvr-i2c.c index bc5975b17c0c..785c8508a46e 100644 --- a/drivers/media/usb/hdpvr/hdpvr-i2c.c +++ b/drivers/media/usb/hdpvr/hdpvr-i2c.c @@ -193,8 +193,6 @@ static int hdpvr_activate_ir(struct hdpvr_device *dev) int hdpvr_register_i2c_adapter(struct hdpvr_device *dev) { - int retval = -ENOMEM; - hdpvr_activate_ir(dev); dev->i2c_adapter = hdpvr_i2c_adapter_template; @@ -202,9 +200,7 @@ int hdpvr_register_i2c_adapter(struct hdpvr_device *dev) i2c_set_adapdata(&dev->i2c_adapter, dev); - retval = i2c_add_adapter(&dev->i2c_adapter); - - return retval; + return i2c_add_adapter(&dev->i2c_adapter); } #endif |