diff options
author | Yufen Yu <yuyufen@huawei.com> | 2019-01-29 16:34:04 +0800 |
---|---|---|
committer | Jens Axboe <axboe@kernel.dk> | 2019-02-12 09:13:18 -0700 |
commit | 96d7cb932e826219ec41ac02e5af037ffae6098c (patch) | |
tree | 5064e8614989c7d577066c3d3a691b86f95fe864 /drivers/block | |
parent | aef1897cd36dcf5e296f1d2bae7e0d268561b685 (diff) | |
download | linux-96d7cb932e826219ec41ac02e5af037ffae6098c.tar.gz linux-96d7cb932e826219ec41ac02e5af037ffae6098c.tar.bz2 linux-96d7cb932e826219ec41ac02e5af037ffae6098c.zip |
floppy: check_events callback should not return a negative number
floppy_check_events() is supposed to return bit flags to say which
events occured. We should return zero to say that no event flags are
set. Only BIT(0) and BIT(1) are used in the caller. And .check_events
interface also expect to return an unsigned int value.
However, after commit a0c80efe5956, it may return -EINTR (-4u).
Here, both BIT(0) and BIT(1) are cleared. So this patch shouldn't
affect runtime, but it obviously is still worth fixing.
Reviewed-by: Dan Carpenter <dan.carpenter@oracle.com>
Fixes: a0c80efe5956 ("floppy: fix lock_fdc() signal handling")
Signed-off-by: Yufen Yu <yuyufen@huawei.com>
Signed-off-by: Jens Axboe <axboe@kernel.dk>
Diffstat (limited to 'drivers/block')
-rw-r--r-- | drivers/block/floppy.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/block/floppy.c b/drivers/block/floppy.c index 6f2856c6d0f2..55481b40df9a 100644 --- a/drivers/block/floppy.c +++ b/drivers/block/floppy.c @@ -4075,7 +4075,7 @@ static unsigned int floppy_check_events(struct gendisk *disk, if (time_after(jiffies, UDRS->last_checked + UDP->checkfreq)) { if (lock_fdc(drive)) - return -EINTR; + return 0; poll_drive(false, 0); process_fd_request(); } |