Skip to contentSkip to conversation

UBI: fastmap: correct error check

PATCH In review Brian Norris 3 participants 6 messages May 21, 2014 – Jul 16, 2014

Subsystems (3)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 UBI: fastmap: correct error check

The return value from ubi_io_read_ec_hdr() was stored in 'err', not in 'ret'.

This issue was reported by Coverity Scan.

Cc Richard Weinberger <[email protected]>
---
 drivers/mtd/ubi/fastmap.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/mtd/ubi/fastmap.c +1 -1
index c5dad652614d..6de0e10fcea3 100644
@@ -423,7 +423,7 @@ static int scan_pool(struct ubi_device *ubi, struct ubi_attach_info *ai,
 				pnum, err);
 			ret = err > 0 ? UBI_BAD_FASTMAP : err;
 			goto out;
-		} else if (ret == UBI_IO_BITFLIPS)
+		} else if (err == UBI_IO_BITFLIPS)
 			scrub = 1;
 
 		/*
Signature · 1 line
1.7.9.5
#2 lore raw

Hi Artem,

Quoted 6 lines · Richard Weinberger

Am 21.05.2014 07:35, schrieb Brian Norris:

Quoted 4 lines

The return value from ubi_io_read_ec_hdr() was stored in 'err', not in 'ret'.

This issue was reported by Coverity Scan.

Quoted 7 lines

I begin to love Coverity. :-)
Thanks for the patch, Brian!

Quoted 2 lines
Cc Richard Weinberger <[email protected]>

Ping.

Brian

#3 lore raw
Quoted 12 lines · Brian Norris

Hi Artem,

Quoted 9 lines · Richard Weinberger

Am 21.05.2014 07:35, schrieb Brian Norris:

Quoted 4 lines

The return value from ubi_io_read_ec_hdr() was stored in 'err', not in 'ret'.

This issue was reported by Coverity Scan.

I begin to love Coverity. :-)
Thanks for the patch, Brian!

Quoted 6 lines
Quoted 4 lines
Quoted 2 lines
Cc Richard Weinberger <[email protected]>

Ping.

Ooops, missed this completely. Let me merge it a bit later, after 3.16-rc1. Thanks!

Signature · 2 lines
Best Regards,
Artem Bityutskiy
#4 lore raw

Hi Artem,

Quoted 14 lines · Artem Bityutskiy
Quoted 13 lines · Brian Norris
Quoted 12 lines · Richard Weinberger

Am 21.05.2014 07:35, schrieb Brian Norris:

Quoted 4 lines

The return value from ubi_io_read_ec_hdr() was stored in 'err', not in 'ret'.

This issue was reported by Coverity Scan.

I begin to love Coverity. :-)
Thanks for the patch, Brian!

Quoted 2 lines
Cc Richard Weinberger <[email protected]>
Quoted 6 lines
Quoted 3 lines
Quoted 1 line

Ping.

Ooops, missed this completely. Let me merge it a bit later, after 3.16-rc1. Thanks!

'Tis after 3.16-rc1!

Brian

#5 lore raw
Quoted 4 lines · Brian Norris
Quoted 2 lines

Ooops, missed this completely. Let me merge it a bit later, after 3.16-rc1. Thanks!

'Tis after 3.16-rc1!

I'll send a pull request today/tomorrow, just returned from vacation.

Signature · 2 lines
Best Regards,
Artem Bityutskiy