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.carpen...@oracle.com>

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
_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel

Reply via email to