Commit df75db1f authored by Jiapeng Chong's avatar Jiapeng Chong Committed by Jens Axboe

block: ataflop: Fix warning comparing pointer to 0

Fix the following coccicheck warning:

./drivers/block/ataflop.c:1464:20-21: WARNING comparing pointer to 0.
Reported-by: default avatarAbaci Robot <abaci@linux.alibaba.com>
Signed-off-by: default avatarJiapeng Chong <jiapeng.chong@linux.alibaba.com>
Link: https://lore.kernel.org/r/1635501029-81391-1-git-send-email-jiapeng.chong@linux.alibaba.comSigned-off-by: default avatarJens Axboe <axboe@kernel.dk>
parent 1b86db5f
...@@ -1460,8 +1460,7 @@ static int floppy_revalidate(struct gendisk *disk) ...@@ -1460,8 +1460,7 @@ static int floppy_revalidate(struct gendisk *disk)
unsigned int drive = p - unit; unsigned int drive = p - unit;
if (test_bit(drive, &changed_floppies) || if (test_bit(drive, &changed_floppies) ||
test_bit(drive, &fake_change) || test_bit(drive, &fake_change) || !p->disktype) {
p->disktype == 0) {
if (UD.flags & FTD_MSG) if (UD.flags & FTD_MSG)
printk(KERN_ERR "floppy: clear format %p!\n", UDT); printk(KERN_ERR "floppy: clear format %p!\n", UDT);
BufferDrive = -1; BufferDrive = -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