Skip to content

Commit

Permalink
staging: Fix bdops->check_events() misconversion in cyasblkdev_block.c
Browse files Browse the repository at this point in the history
Commit cafb0bf (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 <tj@kernel.org>
Reported-by: Milton Miller <miltonm@bga.com>
Signed-off-by: Jens Axboe <jaxboe@fusionio.com>
  • Loading branch information
Tejun Heo authored and Jens Axboe committed Mar 26, 2011
1 parent 9ced0b9 commit 0b58b4e
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit 0b58b4e

Please sign in to comment.