]> Git Repo - linux.git/commitdiff
ata: pata_macio: fix comparing pointer to 0
authorChen Zhou <[email protected]>
Tue, 21 Jan 2020 01:28:27 +0000 (09:28 +0800)
committerJens Axboe <[email protected]>
Wed, 22 Jan 2020 17:31:55 +0000 (10:31 -0700)
Fixes coccicheck warning:

./drivers/ata/pata_macio.c:982:31-32:
WARNING comparing pointer to 0, suggest !E

Compare pointer-typed values to NULL rather than 0.

Acked-by: Bartlomiej Zolnierkiewicz <[email protected]>
Signed-off-by: Chen Zhou <[email protected]>
Signed-off-by: Jens Axboe <[email protected]>
drivers/ata/pata_macio.c

index 1bfd0154dad5db964e49e90f4acdff5d7f45ce0f..e47a28271f5bb46334d043e8bb69ab2cf8f8230d 100644 (file)
@@ -979,7 +979,7 @@ static void pata_macio_invariants(struct pata_macio_priv *priv)
        priv->aapl_bus_id =  bidp ? *bidp : 0;
 
        /* Fixup missing Apple bus ID in case of media-bay */
-       if (priv->mediabay && bidp == 0)
+       if (priv->mediabay && !bidp)
                priv->aapl_bus_id = 1;
 }
 
This page took 0.058632 seconds and 4 git commands to generate.