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

Commit c3beccb7 authored by Sana Venkat Raju's avatar Sana Venkat Raju
Browse files

spi_qsd: Fix for SPI crash while updating the message status



When transfer speed exceeds the maximum supported frequency,
cur_msg is not initialized, Thus accessing the same cause kernel
crash. This patch corrects this.

CRs-Fixed: 647032
Change-Id: Ic0487a6b8859040f57c085fdcd78093480e64d49
Signed-off-by: default avatarSana Venkat Raju <c_vsana@codeaurora.org>
parent 24bb7c34
Loading
Loading
Loading
Loading
+3 −2
Original line number Diff line number Diff line
@@ -1828,7 +1828,9 @@ static int msm_spi_transfer_one_message(struct spi_master *master,
				tr->speed_hz, tr->bits_per_word,
				tr->tx_buf, tr->rx_buf);
			status_error = -EINVAL;
			goto out;
			msg->status = status_error;
			spi_finalize_current_message(master);
			return 0;
		}
	}

@@ -1871,7 +1873,6 @@ static int msm_spi_transfer_one_message(struct spi_master *master,
	if (dd->suspended)
		wake_up_interruptible(&dd->continue_suspend);

out:
	dd->cur_msg->status = status_error;
	spi_finalize_current_message(master);
	return 0;