drivers: net: can: ignore the data if command byte is 0xFF

Ignore the data from spi if data read happens to be 0xFF.

Change-Id: Ib1f28b70ee11e99f73a80166df56132371076f86
Signed-off-by: Balachandra C S <balacs@codeaurora.org>
This commit is contained in:
Balachandra C S 2018-04-26 18:10:44 +05:30
parent 348619f43f
commit 193f8ec5c6

View file

@ -445,8 +445,8 @@ static int qti_can_process_rx(struct qti_can *priv_data, char *rx_buf)
} else {
data = rx_buf + length_processed;
resp = (struct spi_miso *)data;
if (resp->cmd == 0) {
/* special case. ignore cmd==0 */
if (resp->cmd == 0x00 || resp->cmd == 0xFF) {
/* special case. ignore cmd==0x00, 0xFF */
length_processed += 1;
continue;
}