Skip to content

Commit c4a6137

Browse files
de-nordiccarlescufi
authored andcommitted
drivers/flash/nrf_qspi_nor: Fix qspi_sfdp_read error path
The commit fixes processing of a return value from the ANOMALY_122_INIT call. Fixes #39923 Signed-off-by: Dominik Ermel <[email protected]>
1 parent 2a232bd commit c4a6137

File tree

1 file changed

+6
-4
lines changed

1 file changed

+6
-4
lines changed

drivers/flash/nrf_qspi_nor.c

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -609,11 +609,13 @@ static int qspi_sfdp_read(const struct device *dev, off_t offset,
609609
.io3_level = true,
610610
};
611611

612-
int res = ANOMALY_122_INIT(dev);
612+
int ret = ANOMALY_122_INIT(dev);
613+
nrfx_err_t res = NRFX_SUCCESS;
613614

614-
if (res != NRFX_SUCCESS) {
615-
LOG_DBG("ANOMALY_122_INIT: %x", res);
616-
goto out;
615+
if (ret != 0) {
616+
LOG_DBG("ANOMALY_122_INIT: %d", ret);
617+
ANOMALY_122_UNINIT(dev);
618+
return ret;
617619
}
618620

619621
qspi_lock(dev);

0 commit comments

Comments
 (0)