]> git.baikalelectronics.ru Git - kernel.git/commit
ata: sata_mv: Fix the error handling of mv_chip_id()
authorZheyu Ma <zheyuma97@gmail.com>
Fri, 22 Oct 2021 09:12:26 +0000 (09:12 +0000)
committerDamien Le Moal <damien.lemoal@opensource.wdc.com>
Sun, 24 Oct 2021 23:53:04 +0000 (08:53 +0900)
commite62e1015f4432af707c6f3d9c1e1bb91d4c90b75
treeb3d0dcf247ebd8ef3add3c8af88f41228e5713c3
parent9379d03b82ec28f5fa3a50147239896c22bfa65e
ata: sata_mv: Fix the error handling of mv_chip_id()

mv_init_host() propagates the value returned by mv_chip_id() which in turn
gets propagated by mv_pci_init_one() and hits local_pci_probe().

During the process of driver probing, the probe function should return < 0
for failure, otherwise, the kernel will treat value > 0 as success.

Since this is a bug rather than a recoverable runtime error we should
use dev_alert() instead of dev_err().

Signed-off-by: Zheyu Ma <zheyuma97@gmail.com>
Signed-off-by: Damien Le Moal <damien.lemoal@opensource.wdc.com>
drivers/ata/sata_mv.c