[PATCH] drm/i2c: tda998x: remove an unecessary check

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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




[Index of Archives]     [Linux DRI Users]     [Linux Intel Graphics]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [XFree86]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [XFree86]
  Powered by Linux