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@xxxxxxxxxx> 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 -- To unsubscribe from this list: send the line "unsubscribe kernel-janitors" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html