[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PULL 13/67] hw/ssi/pnv_spi: Return early in transfer()
From: |
Nicholas Piggin |
Subject: |
[PULL 13/67] hw/ssi/pnv_spi: Return early in transfer() |
Date: |
Mon, 4 Nov 2024 10:18:02 +1000 |
From: Philippe Mathieu-Daudé <philmd@linaro.org>
Return early to simplify next commit.
No logical change intended.
Cc: qemu-stable@nongnu.org
Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org>
Signed-off-by: Nicholas Piggin <npiggin@gmail.com>
---
hw/ssi/pnv_spi.c | 7 ++++---
1 file changed, 4 insertions(+), 3 deletions(-)
diff --git a/hw/ssi/pnv_spi.c b/hw/ssi/pnv_spi.c
index d15a5970b4..72bcc00de7 100644
--- a/hw/ssi/pnv_spi.c
+++ b/hw/ssi/pnv_spi.c
@@ -217,6 +217,9 @@ static void transfer(PnvSpi *s, PnvXferBuffer *payload)
PnvXferBuffer *rsp_payload = NULL;
rsp_payload = pnv_spi_xfer_buffer_new();
+ if (!rsp_payload) {
+ return;
+ }
for (int offset = 0; offset < payload->len; offset += s->transfer_len) {
tx = 0;
for (int i = 0; i < s->transfer_len; i++) {
@@ -235,9 +238,7 @@ static void transfer(PnvSpi *s, PnvXferBuffer *payload)
(rx >> (8 * (s->transfer_len - 1) - i * 8)) & 0xFF;
}
}
- if (rsp_payload != NULL) {
- spi_response(s, s->N1_bits, rsp_payload);
- }
+ spi_response(s, s->N1_bits, rsp_payload);
}
static inline uint8_t get_seq_index(PnvSpi *s)
--
2.45.2
- [PULL 05/67] target/ppc: Fix mtDPDES targeting SMT siblings, (continued)
- [PULL 05/67] target/ppc: Fix mtDPDES targeting SMT siblings, Nicholas Piggin, 2024/11/03
- [PULL 06/67] target/ppc: PMIs are level triggered, Nicholas Piggin, 2024/11/03
- [PULL 07/67] target/ppc: Fix doorbell delivery to threads in powersave, Nicholas Piggin, 2024/11/03
- [PULL 08/67] target/ppc: Fix HFSCR facility checks, Nicholas Piggin, 2024/11/03
- [PULL 09/67] target/ppc: Fix VRMA to not check virtual page class key protection, Nicholas Piggin, 2024/11/03
- [PULL 10/67] ppc/pnv: ADU fix possible buffer overrun with invalid size, Nicholas Piggin, 2024/11/03
- [PULL 11/67] MAINTAINERS: Cover PowerPC SPI model in PowerNV section, Nicholas Piggin, 2024/11/03
- [PULL 12/67] hw/ssi/pnv_spi: Match _xfer_buffer_free() with _xfer_buffer_new(), Nicholas Piggin, 2024/11/03
- [PULL 13/67] hw/ssi/pnv_spi: Return early in transfer(),
Nicholas Piggin <=
- [PULL 14/67] hw/ssi/pnv_spi: Fixes Coverity CID 1558831, Nicholas Piggin, 2024/11/03
- [PULL 15/67] tests/tcg: Replace -mpower8-vector with -mcpu=power8, Nicholas Piggin, 2024/11/03
- [PULL 16/67] hw/ppc: fix decrementer with BookE timers, Nicholas Piggin, 2024/11/03
- [PULL 17/67] ppc/spapr: remove deprecated machine pseries-2.1, Nicholas Piggin, 2024/11/03
- [PULL 18/67] ppc/spapr: remove deprecated machine pseries-2.2, Nicholas Piggin, 2024/11/03
- [PULL 23/67] ppc/spapr: remove deprecated machine pseries-2.7, Nicholas Piggin, 2024/11/03
- [PULL 21/67] ppc/spapr: remove deprecated machine pseries-2.5, Nicholas Piggin, 2024/11/03
- [PULL 19/67] ppc/spapr: remove deprecated machine pseries-2.3, Nicholas Piggin, 2024/11/03
- [PULL 20/67] ppc/spapr: remove deprecated machine pseries-2.4, Nicholas Piggin, 2024/11/03
- [PULL 22/67] ppc/spapr: remove deprecated machine pseries-2.6, Nicholas Piggin, 2024/11/03