[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-ID: <20200121012827.1036-1-chenzhou10@huawei.com>
Date: Tue, 21 Jan 2020 09:28:27 +0800
From: Chen Zhou <chenzhou10@...wei.com>
To: <b.zolnierkie@...sung.com>, <axboe@...nel.dk>
CC: <linux-ide@...r.kernel.org>, <linux-kernel@...r.kernel.org>,
<chenzhou10@...wei.com>
Subject: [PATCH -next] 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.
Signed-off-by: Chen Zhou <chenzhou10@...wei.com>
---
drivers/ata/pata_macio.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/ata/pata_macio.c b/drivers/ata/pata_macio.c
index 1bfd015..e47a282 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;
}
--
2.7.4
Powered by blists - more mailing lists