Re: [PATCH] mtd: spi-nor: Check for spi_nor_hwcaps_read2cmd() return value

2017-09-19 Thread Cyrille Pitchen
Hi Richard, Le 17/09/2017 à 11:57, Richard Weinberger a écrit : > The function can return a negativ value in case of errors, > don't use it blindly as array index. > > Detected by CoverityScan CID#1418067 ("Memory - illegal accesses") > Fixes: f384b352cbf0 ("mtd: spi-nor: parse Serial Flash

Re: [PATCH] mtd: spi-nor: Check for spi_nor_hwcaps_read2cmd() return value

2017-09-19 Thread Cyrille Pitchen
Hi Richard, Le 17/09/2017 à 11:57, Richard Weinberger a écrit : > The function can return a negativ value in case of errors, > don't use it blindly as array index. > > Detected by CoverityScan CID#1418067 ("Memory - illegal accesses") > Fixes: f384b352cbf0 ("mtd: spi-nor: parse Serial Flash

Re: [PATCH] mtd: spi-nor: Check for spi_nor_hwcaps_read2cmd() return value

2017-09-18 Thread Richard Weinberger
Am Montag, 18. September 2017, 11:39:45 CEST schrieb Boris Brezillon: > On Sun, 17 Sep 2017 11:57:50 +0200 > > Richard Weinberger wrote: > > The function can return a negativ value in case of errors, > > don't use it blindly as array index. > > > > Detected by CoverityScan

Re: [PATCH] mtd: spi-nor: Check for spi_nor_hwcaps_read2cmd() return value

2017-09-18 Thread Richard Weinberger
Am Montag, 18. September 2017, 11:39:45 CEST schrieb Boris Brezillon: > On Sun, 17 Sep 2017 11:57:50 +0200 > > Richard Weinberger wrote: > > The function can return a negativ value in case of errors, > > don't use it blindly as array index. > > > > Detected by CoverityScan CID#1418067 ("Memory

Re: [PATCH] mtd: spi-nor: Check for spi_nor_hwcaps_read2cmd() return value

2017-09-18 Thread Boris Brezillon
On Sun, 17 Sep 2017 11:57:50 +0200 Richard Weinberger wrote: > The function can return a negativ value in case of errors, > don't use it blindly as array index. > > Detected by CoverityScan CID#1418067 ("Memory - illegal accesses") > Fixes: f384b352cbf0 ("mtd: spi-nor: parse

Re: [PATCH] mtd: spi-nor: Check for spi_nor_hwcaps_read2cmd() return value

2017-09-18 Thread Boris Brezillon
On Sun, 17 Sep 2017 11:57:50 +0200 Richard Weinberger wrote: > The function can return a negativ value in case of errors, > don't use it blindly as array index. > > Detected by CoverityScan CID#1418067 ("Memory - illegal accesses") > Fixes: f384b352cbf0 ("mtd: spi-nor: parse Serial Flash

[PATCH] mtd: spi-nor: Check for spi_nor_hwcaps_read2cmd() return value

2017-09-17 Thread Richard Weinberger
The function can return a negativ value in case of errors, don't use it blindly as array index. Detected by CoverityScan CID#1418067 ("Memory - illegal accesses") Fixes: f384b352cbf0 ("mtd: spi-nor: parse Serial Flash Discoverable Parameters (SFDP) tables") Signed-off-by: Richard Weinberger

[PATCH] mtd: spi-nor: Check for spi_nor_hwcaps_read2cmd() return value

2017-09-17 Thread Richard Weinberger
The function can return a negativ value in case of errors, don't use it blindly as array index. Detected by CoverityScan CID#1418067 ("Memory - illegal accesses") Fixes: f384b352cbf0 ("mtd: spi-nor: parse Serial Flash Discoverable Parameters (SFDP) tables") Signed-off-by: Richard Weinberger ---