Skip to content

Commit bc43826

Browse files
alpineislenashif
authored andcommitted
drivers: fpga: renesas slg471x5: evaluate return value
Eveluate return value of i2c read during verification of loaded bitstream. Signed-off-by: Elias Speinle <[email protected]>
1 parent 676d0c1 commit bc43826

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

drivers/fpga/fpga_slg471x5.c

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -71,9 +71,12 @@ static int fpga_slg471x5_verify(const struct device *dev, uint8_t *img, uint32_t
7171
{
7272
const struct fpga_slg471x5_config *config = dev->config;
7373
uint8_t buf[SLG471X5_NREG] = {0}, addr, len;
74-
int i;
74+
int i, ret;
7575

76-
i2c_read_dt(&config->bus, buf, SLG471X5_NREG);
76+
ret = i2c_read_dt(&config->bus, buf, SLG471X5_NREG);
77+
if (ret < 0) {
78+
return ret;
79+
}
7780

7881
for (i = 0; i < config->verify_list_len; i++) {
7982
addr = config->verify_list[i].addr;

0 commit comments

Comments
 (0)