Commit ffa302ef authored by Chen Zhou's avatar Chen Zhou Committed by Jens Axboe

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: default avatarBartlomiej Zolnierkiewicz <b.zolnierkie@samsung.com>
Signed-off-by: default avatarChen Zhou <chenzhou10@huawei.com>
Signed-off-by: default avatarJens Axboe <axboe@kernel.dk>
parent 272ecd60
......@@ -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;
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment