diff options
-rw-r--r-- | drivers/ata/libata-core.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/drivers/ata/libata-core.c b/drivers/ata/libata-core.c index 99d4fbffb0df..9bfe329fb579 100644 --- a/drivers/ata/libata-core.c +++ b/drivers/ata/libata-core.c | |||
@@ -3705,6 +3705,10 @@ int ata_dev_revalidate(struct ata_device *dev, unsigned int readid_flags) | |||
3705 | "%llu != %llu\n", | 3705 | "%llu != %llu\n", |
3706 | (unsigned long long)n_sectors, | 3706 | (unsigned long long)n_sectors, |
3707 | (unsigned long long)dev->n_sectors); | 3707 | (unsigned long long)dev->n_sectors); |
3708 | |||
3709 | /* restore original n_sectors */ | ||
3710 | dev->n_sectors = n_sectors; | ||
3711 | |||
3708 | rc = -ENODEV; | 3712 | rc = -ENODEV; |
3709 | goto fail; | 3713 | goto fail; |
3710 | } | 3714 | } |