Skip to contentSkip to conversation

media: cec: set ev rather than v with CEC_PIN_EVENT_FL_DROPPED bit

PATCH New Colin King 1 participant 1 message Apr 18, 2018

Subsystems (3)
lore
Share & tools
lore

Colin King

author
#0 lore raw

PATCH 1/1 media: cec: set ev rather than v with CEC_PIN_EVENT_FL_DROPPED bit

From: Colin Ian King <[email protected]>

Setting v with the CEC_PIN_EVENT_FL_DROPPED is incorrect, instead ev should be set with this bit. Fix this.

Detected by CoverityScan, CID#1467974 ("Extra high-order bits")

Fixes 6ec1cbf6b125 ("media: cec: improve CEC pin event handling")
---
 drivers/media/cec/cec-pin.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/media/cec/cec-pin.c +1 -1
index 2a5df99735fa..6e311424f0dc 100644
@@ -119,7 +119,7 @@ static void cec_pin_update(struct cec_pin *pin, bool v, bool force)
 
 		if (pin->work_pin_events_dropped) {
 			pin->work_pin_events_dropped = false;
-			v |= CEC_PIN_EVENT_FL_DROPPED;
+			ev |= CEC_PIN_EVENT_FL_DROPPED;
 		}
 		pin->work_pin_events[pin->work_pin_events_wr] = ev;
 		pin->work_pin_ts[pin->work_pin_events_wr] = ktime_get();
Signature · 1 line
2.17.0