Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit aedf64ed authored by Veera Sundaram Sankaran's avatar Veera Sundaram Sankaran
Browse files

msm: display: qpic: Fix possible null dereference



Fixed possible null dereference in qpic

Change-Id: I3fcfb1d8935b293c4f04d7e6da49d55a88fc2114
Signed-off-by: default avatarVeera Sundaram Sankaran <veeras@codeaurora.org>
parent 7aa1b194
Loading
Loading
Loading
Loading
+4 −2
Original line number Diff line number Diff line
@@ -525,8 +525,10 @@ static int qpic_send_pkt_sw(u32 cmd, u32 len, u8 *param)
	if (len <= 4) {
		len = (len + 3) / 4; /* len in dwords */
		data = 0;
		if (param) {
			for (i = 0; i < len; i++)
				data |= (u32)param[i] << (8 * i);
		}
		QPIC_OUTP(QPIC_REG_QPIC_LCDC_CMD_DATA_CYCLE_CNT, len);
		QPIC_OUTP(QPIC_REG_LCD_DEVICE_CMD0 + (4 * cmd), data);
		return 0;