Merge tag 'libata-5.15-rc7' of git://git.kernel.org/pub/scm/linux/kernel/git/dlemoal...
authorLinus Torvalds <torvalds@linux-foundation.org>
Mon, 25 Oct 2021 16:57:28 +0000 (09:57 -0700)
committerLinus Torvalds <torvalds@linux-foundation.org>
Mon, 25 Oct 2021 16:57:28 +0000 (09:57 -0700)
Pull libata fix from Damien Le Moal:
 "A single fix in this pull request addressing an invalid error code
  return in the sata_mv driver (from Zheyu)"

* tag 'libata-5.15-rc7' of git://git.kernel.org/pub/scm/linux/kernel/git/dlemoal/libata:
  ata: sata_mv: Fix the error handling of mv_chip_id()

drivers/ata/sata_mv.c

index 9d86203..c53633d 100644 (file)
@@ -3896,8 +3896,8 @@ static int mv_chip_id(struct ata_host *host, unsigned int board_idx)
                break;
 
        default:
-               dev_err(host->dev, "BUG: invalid board index %u\n", board_idx);
-               return 1;
+               dev_alert(host->dev, "BUG: invalid board index %u\n", board_idx);
+               return -EINVAL;
        }
 
        hpriv->hp_flags = hp_flags;