diff --git a/drivers/ata/libata-core.c b/drivers/ata/libata-core.c index 884ae73b11eac13659e4bd2efe6487d52440524b..2ea572628b1c8e8c0c27042f9d780d6af793f29d 100644 --- a/drivers/ata/libata-core.c +++ b/drivers/ata/libata-core.c @@ -3109,7 +3109,7 @@ int sata_down_spd_limit(struct ata_link *link, u32 spd_limit) */ if (spd > 1) mask &= (1 << (spd - 1)) - 1; - else + else if (link->sata_spd) return -EINVAL; /* were we already at the bottom? */