mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2024-10-02 23:27:06 +00:00
floppy: check_events callback should not return a negative number
[ Upstream commit96d7cb932e
] 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 commita0c80efe59
, 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:a0c80efe59
("floppy: fix lock_fdc() signal handling") Signed-off-by: Yufen Yu <yuyufen@huawei.com> Signed-off-by: Jens Axboe <axboe@kernel.dk> Signed-off-by: Sasha Levin <sashal@kernel.org>
This commit is contained in:
parent
8faa6f2fc2
commit
489a9abf60
1 changed files with 1 additions and 1 deletions
|
@ -3752,7 +3752,7 @@ static unsigned int floppy_check_events(struct gendisk *disk,
|
||||||
|
|
||||||
if (time_after(jiffies, UDRS->last_checked + UDP->checkfreq)) {
|
if (time_after(jiffies, UDRS->last_checked + UDP->checkfreq)) {
|
||||||
if (lock_fdc(drive))
|
if (lock_fdc(drive))
|
||||||
return -EINTR;
|
return 0;
|
||||||
poll_drive(false, 0);
|
poll_drive(false, 0);
|
||||||
process_fd_request();
|
process_fd_request();
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue