Message ID | alpine.DEB.2.22.394.2202091232550.52266@hadrien (mailing list archive) |
---|---|
State | New, archived |
Headers | show |
Series | mtd: spi-nor: fix minmax.cocci warnings | expand |
--- a/drivers/mtd/spi-nor/core.c +++ b/drivers/mtd/spi-nor/core.c @@ -2034,10 +2034,7 @@ static int spi_nor_read(struct mtd_info (offset << nor->shift); } } - if (len < rem_bank_len) - read_len = len; - else - read_len = rem_bank_len; + read_len = min(len, rem_bank_len); /* Wait till previous write/erase is done. */ ret = spi_nor_wait_till_ready(nor);