ATA fixes for 5.18-rc4
A single fix to avoid a NULL pointer dereference in the pata_marvell driver with adapters not supporting DMA, from Zheyu. -----BEGIN PGP SIGNATURE----- iHUEABYKAB0WIQSRPv8tYSvhwAzJdzjdoc3SxdoYdgUCYmMpKgAKCRDdoc3SxdoY dnkYAP46Mc/ENx1CIE6PA8xM6pmItw++ddyf3nN71xtqBTjTHgD+LIz9BRq8nc0u aTkagLmdRsrmdSJT6nnHGREI/TJIUAc= =PSEF -----END PGP SIGNATURE----- Merge tag 'ata-5.18-rc4' of git://git.kernel.org/pub/scm/linux/kernel/git/dlemoal/libata Pull ATA fix from Damien Le Moal: "A single fix to avoid a NULL pointer dereference in the pata_marvell driver with adapters not supporting DMA, from Zheyu" * tag 'ata-5.18-rc4' of git://git.kernel.org/pub/scm/linux/kernel/git/dlemoal/libata: ata: pata_marvell: Check the 'bmdma_addr' beforing reading
This commit is contained in:
Коммит
2e5991fa39
|
@ -77,6 +77,8 @@ static int marvell_cable_detect(struct ata_port *ap)
|
|||
switch(ap->port_no)
|
||||
{
|
||||
case 0:
|
||||
if (!ap->ioaddr.bmdma_addr)
|
||||
return ATA_CBL_PATA_UNK;
|
||||
if (ioread8(ap->ioaddr.bmdma_addr + 1) & 1)
|
||||
return ATA_CBL_PATA40;
|
||||
return ATA_CBL_PATA80;
|
||||
|
|
Загрузка…
Ссылка в новой задаче