if (wilc_spi_tx_rx(wilc, wb, rb, len2)) {
dev_err(&spi->dev, "Failed cmd write, bus error...\n");
- result = N_FAIL;
- return result;
+ return N_FAIL;
}
/**
dev_err(&spi->dev,
"Failed cmd response, cmd (%02x), resp (%02x)\n",
cmd, rsp);
- result = N_FAIL;
- return result;
+ return N_FAIL;
}
/**
if (rsp != 0x00) {
dev_err(&spi->dev, "Failed cmd state response state (%02x)\n",
rsp);
- result = N_FAIL;
- return result;
+ return N_FAIL;
}
if ((cmd == CMD_INTERNAL_READ) || (cmd == CMD_SINGLE_READ)
if (retry <= 0) {
dev_err(&spi->dev,
"Error, data read response (%02x)\n", rsp);
- result = N_RESET;
- return result;
+ return N_RESET;
}
if ((cmd == CMD_INTERNAL_READ) || (cmd == CMD_SINGLE_READ)) {
} else {
dev_err(&spi->dev,
"buffer overrun when reading data.\n");
- result = N_FAIL;
- return result;
+ return N_FAIL;
}
if (!g_spi.crc_off) {
crc[1] = rb[rix++];
} else {
dev_err(&spi->dev, "buffer overrun when reading crc.\n");
- result = N_FAIL;
- return result;
+ return N_FAIL;
}
}
} else if ((cmd == CMD_DMA_READ) || (cmd == CMD_DMA_EXT_READ)) {