@@ -749,21 +749,22 @@ static void read_from_hw(struct bcm_qspi *qspi, int slots)
tp = qspi->trans_pos;
for (slot = 0; slot < slots; slot++) {
- if (tp.trans->bits_per_word <= 8) {
- u8 *buf = tp.trans->rx_buf;
-
- if (buf)
- buf[tp.byte] = read_rxram_slot_u8(qspi, slot);
- dev_dbg(&qspi->pdev->dev, "RD %02x\n",
- buf ? buf[tp.byte] : 0x0);
- } else {
- u16 *buf = tp.trans->rx_buf;
-
- if (buf)
- buf[tp.byte / 2] = read_rxram_slot_u16(qspi,
- slot);
- dev_dbg(&qspi->pdev->dev, "RD %04x\n",
- buf ? buf[tp.byte / 2] : 0x0);
+ if (tp.trans->rx_buf) {
+ if (tp.trans->bits_per_word <= 8) {
+ u8 *buf = tp.trans->rx_buf;
+
+ buf[tp.byte] =
+ read_rxram_slot_u8(qspi, slot);
+ dev_dbg(&qspi->pdev->dev, "RD %02x\n",
+ buf[tp.byte]);
+ } else {
+ u16 *buf = tp.trans->rx_buf;
+
+ buf[tp.byte / 2] =
+ read_rxram_slot_u16(qspi, slot);
+ dev_dbg(&qspi->pdev->dev, "RD %04x\n",
+ buf[tp.byte / 2]);
+ }
}
update_qspi_trans_byte_count(qspi, &tp,