[MTD] m25p80: fix detection of SPI parts

Commit d0e8c47c58575b9131e786edb488fd029eba443e ("m25p80.c extended jedec
support") added support for extended ids but in the process managed to
break detection of all flashes.

The ext jedec id check was inserted into an if statement that lacked
braces, and it did not add the required braces. As such, the detection
routine always returns the first entry in the SPI flash list.

Signed-off-by: Mike Frysinger <vapier@gentoo.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: David Woodhouse <David.Woodhouse@intel.com>

authored by Mike Frysinger and committed by David Woodhouse a3d3f73c cbbd6956

+2 -1
+2 -1
drivers/mtd/devices/m25p80.c
··· 574 for (tmp = 0, info = m25p_data; 575 tmp < ARRAY_SIZE(m25p_data); 576 tmp++, info++) { 577 - if (info->jedec_id == jedec) 578 if (ext_jedec != 0 && info->ext_id != ext_jedec) 579 continue; 580 return info; 581 } 582 dev_err(&spi->dev, "unrecognized JEDEC id %06x\n", jedec); 583 return NULL;
··· 574 for (tmp = 0, info = m25p_data; 575 tmp < ARRAY_SIZE(m25p_data); 576 tmp++, info++) { 577 + if (info->jedec_id == jedec) { 578 if (ext_jedec != 0 && info->ext_id != ext_jedec) 579 continue; 580 return info; 581 + } 582 } 583 dev_err(&spi->dev, "unrecognized JEDEC id %06x\n", jedec); 584 return NULL;