[PATCH] ata: libata: Return -EOPNOTSUPP instead of 1 in atapi_check_dma()

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



-EOPNOTSUPP means not supported, so return -EOPNOTSUPP instead of 1 is
more suitable if ATAPI DMA is not supported in atapi_check_dma().

Signed-off-by: Huacai Chen <chenhuacai@xxxxxxxxxxx>
---
 drivers/ata/libata-core.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/ata/libata-core.c b/drivers/ata/libata-core.c
index c085dd81ebe7..2f5af295e8fc 100644
--- a/drivers/ata/libata-core.c
+++ b/drivers/ata/libata-core.c
@@ -4544,7 +4544,7 @@ int atapi_check_dma(struct ata_queued_cmd *qc)
 	 */
 	if (!(qc->dev->quirks & ATA_QUIRK_ATAPI_MOD16_DMA) &&
 	    unlikely(qc->nbytes & 15))
-		return 1;
+		return -EOPNOTSUPP;
 
 	if (ap->ops->check_atapi_dma)
 		return ap->ops->check_atapi_dma(qc);
-- 
2.47.1





[Index of Archives]     [Linux Filesystems]     [Linux SCSI]     [Linux RAID]     [Git]     [Kernel Newbies]     [Linux Newbie]     [Security]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Samba]     [Device Mapper]

  Powered by Linux