Commit eb0a6fb2 authored by Colin Ian King's avatar Colin Ian King Committed by Mauro Carvalho Chehab
Browse files

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: default avatarColin Ian King <colin.king@canonical.com>
Signed-off-by: default avatarHans Verkuil <hverkuil-cisco@xs4all.nl>
Signed-off-by: default avatarMauro Carvalho Chehab <mchehab+samsung@kernel.org>
parent 7e0bb582
Loading
Loading
Loading
Loading
+1 −5
Original line number Diff line number Diff line
@@ -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