We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 02f6286 commit a296a1bCopy full SHA for a296a1b
drivers/mtd/devices/mtd_dataflash.c
@@ -736,7 +736,7 @@ static struct flash_info dataflash_data[] = {
736
737
static struct flash_info *jedec_probe(struct spi_device *spi)
738
{
739
- int ret, i;
+ int ret;
740
u8 code = OP_READ_ID;
741
u8 id[3];
742
u32 jedec;
@@ -767,9 +767,9 @@ static struct flash_info *jedec_probe(struct spi_device *spi)
767
jedec = jedec << 8;
768
jedec |= id[2];
769
770
- for (i = 0, info = dataflash_data;
771
- i < ARRAY_SIZE(dataflash_data);
772
- i++, info++) {
+ for (info = dataflash_data;
+ info < dataflash_data + ARRAY_SIZE(dataflash_data);
+ info++) {
773
if (info->jedec_id == jedec) {
774
dev_dbg(&spi->dev, "OTP, sector protect%s\n",
775
(info->flags & SUP_POW2PS) ?
0 commit comments