diff options
author | Russell King <rmk+kernel@arm.linux.org.uk> | 2010-03-08 15:21:04 -0500 |
---|---|---|
committer | Russell King <rmk+kernel@arm.linux.org.uk> | 2010-03-08 15:21:04 -0500 |
commit | 988addf82e4c03739375279de73929580a2d4a6a (patch) | |
tree | 989ae1cd4e264bbad80c65f04480486246e7b9f3 /drivers/mtd/ubi/scan.c | |
parent | 004c1c7096659d352b83047a7593e91d8a30e3c5 (diff) | |
parent | 25cf84cf377c0aae5dbcf937ea89bc7893db5176 (diff) |
Merge branch 'origin' into devel-stable
Conflicts:
arch/arm/mach-mx2/devices.c
arch/arm/mach-mx2/devices.h
sound/soc/pxa/pxa-ssp.c
Diffstat (limited to 'drivers/mtd/ubi/scan.c')
-rw-r--r-- | drivers/mtd/ubi/scan.c | 11 |
1 files changed, 4 insertions, 7 deletions
diff --git a/drivers/mtd/ubi/scan.c b/drivers/mtd/ubi/scan.c index 90af61a2c3e4..594184bbd56a 100644 --- a/drivers/mtd/ubi/scan.c +++ b/drivers/mtd/ubi/scan.c | |||
@@ -974,11 +974,8 @@ struct ubi_scan_info *ubi_scan(struct ubi_device *ubi) | |||
974 | seb->ec = si->mean_ec; | 974 | seb->ec = si->mean_ec; |
975 | 975 | ||
976 | err = paranoid_check_si(ubi, si); | 976 | err = paranoid_check_si(ubi, si); |
977 | if (err) { | 977 | if (err) |
978 | if (err > 0) | ||
979 | err = -EINVAL; | ||
980 | goto out_vidh; | 978 | goto out_vidh; |
981 | } | ||
982 | 979 | ||
983 | ubi_free_vid_hdr(ubi, vidh); | 980 | ubi_free_vid_hdr(ubi, vidh); |
984 | kfree(ech); | 981 | kfree(ech); |
@@ -1086,8 +1083,8 @@ void ubi_scan_destroy_si(struct ubi_scan_info *si) | |||
1086 | * @ubi: UBI device description object | 1083 | * @ubi: UBI device description object |
1087 | * @si: scanning information | 1084 | * @si: scanning information |
1088 | * | 1085 | * |
1089 | * This function returns zero if the scanning information is all right, %1 if | 1086 | * This function returns zero if the scanning information is all right, and a |
1090 | * not and a negative error code if an error occurred. | 1087 | * negative error code if not or if an error occurred. |
1091 | */ | 1088 | */ |
1092 | static int paranoid_check_si(struct ubi_device *ubi, struct ubi_scan_info *si) | 1089 | static int paranoid_check_si(struct ubi_device *ubi, struct ubi_scan_info *si) |
1093 | { | 1090 | { |
@@ -1346,7 +1343,7 @@ bad_vid_hdr: | |||
1346 | 1343 | ||
1347 | out: | 1344 | out: |
1348 | ubi_dbg_dump_stack(); | 1345 | ubi_dbg_dump_stack(); |
1349 | return 1; | 1346 | return -EINVAL; |
1350 | } | 1347 | } |
1351 | 1348 | ||
1352 | #endif /* CONFIG_MTD_UBI_DEBUG_PARANOID */ | 1349 | #endif /* CONFIG_MTD_UBI_DEBUG_PARANOID */ |