]> git.baikalelectronics.ru Git - kernel.git/commit
floppy: check_events callback should not return a negative number
authorYufen Yu <yuyufen@huawei.com>
Tue, 29 Jan 2019 08:34:04 +0000 (16:34 +0800)
committerJens Axboe <axboe@kernel.dk>
Tue, 12 Feb 2019 16:13:18 +0000 (09:13 -0700)
commiteba651f2a16190624cc39a84720ceaf245c7fa8c
tree5064e8614989c7d577066c3d3a691b86f95fe864
parentc2f16685bef6bcf5b81df5bb01f7d31aa7449f61
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 e5512bcb80d7, 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: e5512bcb80d7 ("floppy: fix lock_fdc() signal handling")
Signed-off-by: Yufen Yu <yuyufen@huawei.com>
Signed-off-by: Jens Axboe <axboe@kernel.dk>
drivers/block/floppy.c