mirror of
https://github.com/hardkernel/linux.git
synced 2026-06-05 02:21:52 +09: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:
committed by
Greg Kroah-Hartman
parent
de7f08cfd5
commit
86e74ca9fd
@@ -4079,7 +4079,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();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user