|
@@ -541,7 +541,7 @@ int rescan_partitions(struct gendisk *disk, struct block_device *bdev)
|
|
if (!get_capacity(disk) || !(state = check_partition(disk, bdev)))
|
|
if (!get_capacity(disk) || !(state = check_partition(disk, bdev)))
|
|
return 0;
|
|
return 0;
|
|
if (IS_ERR(state)) /* I/O error reading the partition table */
|
|
if (IS_ERR(state)) /* I/O error reading the partition table */
|
|
- return PTR_ERR(state);
|
|
|
|
|
|
+ return -EIO;
|
|
for (p = 1; p < state->limit; p++) {
|
|
for (p = 1; p < state->limit; p++) {
|
|
sector_t size = state->parts[p].size;
|
|
sector_t size = state->parts[p].size;
|
|
sector_t from = state->parts[p].from;
|
|
sector_t from = state->parts[p].from;
|