From: Tejun Heo Date: Sat, 26 Mar 2011 18:52:59 +0000 (+0100) Subject: staging: Fix bdops->check_events() misconversion in cyasblkdev_block.c X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=0b58b4e3e711aed17aa26fafd01be137f6a1ab2e;p=GitHub%2FLineageOS%2Fandroid_kernel_motorola_exynos9610.git staging: Fix bdops->check_events() misconversion in cyasblkdev_block.c Commit cafb0bfca1 (staging: Convert to bdops->check_events()) incorrectly set bd->user_disk_0->events while initializing bd->user_disk_1. Fix it. The problem was spotted by Milton's suspect code pattern detector. Signed-off-by: Tejun Heo Reported-by: Milton Miller Signed-off-by: Jens Axboe --- diff --git a/drivers/staging/westbridge/astoria/block/cyasblkdev_block.c b/drivers/staging/westbridge/astoria/block/cyasblkdev_block.c index 842cd9214a5e..289729daba80 100644 --- a/drivers/staging/westbridge/astoria/block/cyasblkdev_block.c +++ b/drivers/staging/westbridge/astoria/block/cyasblkdev_block.c @@ -1191,7 +1191,7 @@ static int cyasblkdev_add_disks(int bus_num, bd->user_disk_1->first_minor = (devidx + 1) << CYASBLKDEV_SHIFT; bd->user_disk_1->minors = 8; bd->user_disk_1->fops = &cyasblkdev_bdops; - bd->user_disk_0->events = DISK_EVENT_MEDIA_CHANGE; + bd->user_disk_1->events = DISK_EVENT_MEDIA_CHANGE; bd->user_disk_1->private_data = bd; bd->user_disk_1->queue = bd->queue.queue; bd->dbgprn_flags = DBGPRN_RD_RQ;