* [PATCH linux-next] drivers:ataflop: fix warning comparing pointer to 0
@ 2021-08-24 1:09 CGEL
0 siblings, 0 replies; only message in thread
From: CGEL @ 2021-08-24 1:09 UTC (permalink / raw)
To: Jens Axboe; +Cc: linux-block, linux-kernel, Jing Yangyang, Zeal Robot
From: Jing Yangyang <jing.yangyang@zte.com.cn>
Fix the following coccicheck warning:
./drivers/block/ataflop.c:1439:20-21:WARNING: comparing pointer to 0
Reported-by: Zeal Robot <zealci@zte.com.cn>
Signed-off-by: Jing Yangyang <jing.yangyang@zte.com.cn>
---
drivers/block/ataflop.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/block/ataflop.c b/drivers/block/ataflop.c
index a093644..6cd28df 100644
--- a/drivers/block/ataflop.c
+++ b/drivers/block/ataflop.c
@@ -1436,7 +1436,7 @@ static int floppy_revalidate(struct gendisk *disk)
if (test_bit(drive, &changed_floppies) ||
test_bit(drive, &fake_change) ||
- p->disktype == 0) {
+ !p->disktype) {
if (UD.flags & FTD_MSG)
printk(KERN_ERR "floppy: clear format %p!\n", UDT);
BufferDrive = -1;
--
1.8.3.1
^ permalink raw reply related [flat|nested] only message in thread
only message in thread, other threads:[~2021-08-24 1:09 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-08-24 1:09 [PATCH linux-next] drivers:ataflop: fix warning comparing pointer to 0 CGEL
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).