]> Git Repo - linux.git/commitdiff
ata: pata_ali: remove redundant return statement
authorColin Ian King <[email protected]>
Wed, 12 Jan 2022 23:47:41 +0000 (23:47 +0000)
committerDamien Le Moal <[email protected]>
Fri, 14 Jan 2022 06:17:17 +0000 (15:17 +0900)
A return statement is unnecessarily complicated, currently value
in variable mask is bitwise-masked and the variable is being
updated and then returned. Just updating the mask is all that is
required as the following statement is a return.

Signed-off-by: Colin Ian King <[email protected]>
Signed-off-by: Damien Le Moal <[email protected]>
drivers/ata/pata_ali.c

index ab28a6707b94c7379f1e2fafb3cf32c0747050f6..1b90cda27246e405154c25634218b4ec899d8bf0 100644 (file)
@@ -123,7 +123,7 @@ static unsigned long ali_20_filter(struct ata_device *adev, unsigned long mask)
                mask &= ~(ATA_MASK_MWDMA | ATA_MASK_UDMA);
        ata_id_c_string(adev->id, model_num, ATA_ID_PROD, sizeof(model_num));
        if (strstr(model_num, "WDC"))
-               return mask &= ~ATA_MASK_UDMA;
+               mask &= ~ATA_MASK_UDMA;
        return mask;
 }
 
This page took 0.056276 seconds and 4 git commands to generate.