summaryrefslogtreecommitdiff
path: root/drivers/ata/pata_macio.c
diff options
context:
space:
mode:
authorChen Zhou <chenzhou10@huawei.com>2020-01-21 09:28:27 +0800
committerJens Axboe <axboe@kernel.dk>2020-01-22 10:31:55 -0700
commitffa302efe84ed8aa84aaf061ec4448036880b934 (patch)
tree5b2f0a7fb504ffce66ab81be7f04db61b9149fd2 /drivers/ata/pata_macio.c
parent272ecd60a636a8508997ff997ddfa143474e7c81 (diff)
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>
Diffstat (limited to 'drivers/ata/pata_macio.c')
-rw-r--r--drivers/ata/pata_macio.c2
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;
}