media: s5p_cec: limit msg.len to CEC_MAX_MSG_SIZE
Subsystems (4)
Sasha Levin
maintainerPATCH 1/3 media: s5p_cec: limit msg.len to CEC_MAX_MSG_SIZE
From: Hans Verkuil <[email protected]>
[ Upstream commit 93f65ce036863893c164ca410938e0968964b26c ]
I expect that the hardware will have limited this to 16, but just in case it hasn't, check for this corner case.
--- drivers/staging/media/s5p-cec/s5p_cec.c | 2 ++ 1 file changed, 2 insertions(+)
drivers/staging/media/s5p-cec/s5p_cec.c +2 -0
@@ -112,6 +112,8 @@ static irqreturn_t s5p_cec_irq_handler(int irq, void *priv)dev_dbg (cec->dev,"Buffer overrun (worker did not process previous message)\n" ); cec->rx =STATE_BUSY ; cec->msg.len = status >>24 ; +if (cec->msg.len >CEC_MAX_MSG_SIZE ) + cec->msg.len =CEC_MAX_MSG_SIZE ; cec->msg.rx_status =CEC_RX_STATUS_OK ;s5p_cec_get_rx_buf (cec, cec->msg.len, cec->msg.msg);
Signature · 1 line
2.35.1
Sasha Levin
maintainerPATCH 3/3 i2c: xiic: Add platform module alias
From: Martin Tůma <[email protected]>
[ Upstream commit b8caf0a0e04583fb71e21495bef84509182227ea ]
The missing "platform" alias is required for the mgb4 v4l2 driver to load the i2c controller driver when probing the HW.
--- drivers/i2c/busses/i2c-xiic.c | 1 + 1 file changed, 1 insertion(+)
drivers/i2c/busses/i2c-xiic.c +1 -0
@@ -897,6 +897,7 @@ static struct platform_driver xiic_i2c_driver = {module_platform_driver (xiic_i2c_driver); +MODULE_ALIAS ("platform:" DRIVER_NAME );MODULE_AUTHOR ("[email protected]" );MODULE_DESCRIPTION ("Xilinx I2C bus driver" );MODULE_LICENSE ("GPL v2" );
Signature · 1 line
2.35.1
Sasha Levin
maintainerPATCH 2/3 media: dvb-frontends/drxk: initialize err to 0
In reply to Sasha LevinFrom: Hans Verkuil <[email protected]>
[ Upstream commit 20694e96ca089ce6693c2348f8f628ee621e4e74 ]
Fix a compiler warning:
drivers/media/dvb-frontends/drxk_hard.c: In function 'drxk_read_ucblocks':drivers/media/dvb-frontends/drxk_hard.c:6673:21: warning: 'err' may be used uninitialized [-Wmaybe-uninitialized]
6673 | *ucblocks = (u32) err;
| ^~~~~~~~~drivers/media/dvb-frontends/drxk_hard.c:6663:13: note: 'err' was declared here
6663 | u16 err;
| ^~~
--- drivers/media/dvb-frontends/drxk_hard.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/media/dvb-frontends/drxk_hard.c +1 -1
@@ -6697,7 +6697,7 @@ static int drxk_read_snr(struct dvb_frontend *fe, u16 *snr)static int drxk_read_ucblocks (struct dvb_frontend *fe,u32 *ucblocks) {struct drxk_state *state = fe->demodulator_priv; -u16 err; +u16 err =0 ;dprintk (1 ,"\n" );
Signature · 1 line
2.35.1