diff mbox

drm/i2c: tda998x: remove an unecessary check

Message ID 20180602075358.7f63ojsndur5rzgf@kili.mountain (mailing list archive)
State New, archived
Headers show

Commit Message

Dan Carpenter June 2, 2018, 7:53 a.m. UTC
cec_read() returns a u8 so "val" can't be negative.  If there is an
error in cec_read() then it returns zero.

Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
diff mbox

Patch

diff --git a/drivers/gpu/drm/i2c/tda998x_drv.c b/drivers/gpu/drm/i2c/tda998x_drv.c
index 6ebd8842dbcc..86e3aee44686 100644
--- a/drivers/gpu/drm/i2c/tda998x_drv.c
+++ b/drivers/gpu/drm/i2c/tda998x_drv.c
@@ -436,9 +436,6 @@  static void cec_enamods(struct tda998x_priv *priv, u8 mods, bool enable)
 {
 	int val = cec_read(priv, REG_CEC_ENAMODS);
 
-	if (val < 0)
-		return;
-
 	if (enable)
 		val |= mods;
 	else