diff options
author | Chen Zhou <chenzhou10@huawei.com> | 2020-01-21 09:28:27 +0800 |
---|---|---|
committer | Jens Axboe <axboe@kernel.dk> | 2020-01-22 10:31:55 -0700 |
commit | ffa302efe84ed8aa84aaf061ec4448036880b934 (patch) | |
tree | 5b2f0a7fb504ffce66ab81be7f04db61b9149fd2 | |
parent | 272ecd60a636a8508997ff997ddfa143474e7c81 (diff) | |
download | linux-ffa302efe84ed8aa84aaf061ec4448036880b934.tar.gz linux-ffa302efe84ed8aa84aaf061ec4448036880b934.tar.bz2 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; } |