diff options
author | Chen Zhou <chenzhou10@huawei.com> | 2020-01-21 02:28:27 +0100 |
---|---|---|
committer | Jens Axboe <axboe@kernel.dk> | 2020-01-22 18:31:55 +0100 |
commit | ffa302efe84ed8aa84aaf061ec4448036880b934 (patch) | |
tree | 5b2f0a7fb504ffce66ab81be7f04db61b9149fd2 | |
parent | ata: ahci_brcm: BCM7216 reset is self de-asserting (diff) | |
download | linux-ffa302efe84ed8aa84aaf061ec4448036880b934.tar.xz linux-ffa302efe84ed8aa84aaf061ec4448036880b934.zip |
ata: pata_macio: fix comparing pointer to 0
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 <b.zolnierkie@samsung.com>
Signed-off-by: Chen Zhou <chenzhou10@huawei.com>
Signed-off-by: Jens Axboe <axboe@kernel.dk>
-rw-r--r-- | drivers/ata/pata_macio.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/ata/pata_macio.c b/drivers/ata/pata_macio.c index 1bfd0154dad5..e47a28271f5b 100644 --- a/drivers/ata/pata_macio.c +++ b/drivers/ata/pata_macio.c @@ -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; } |