Commit 3ebe8e85 authored by Andrew Morton's avatar Andrew Morton Committed by Linus Torvalds

[PATCH] fix unchecked return value in register_disk()

From: "Luiz Fernando N. Capitulino" <lcapitulino@prefeitura.sp.gov.br>
Signed-off-by: default avatarLuiz Capitulino <lcapitulino@prefeitura.sp.gov.br>
Signed-off-by: default avatarAndrew Morton <akpm@osdl.org>
Signed-off-by: default avatarLinus Torvalds <torvalds@osdl.org>
parent 1775a3e9
......@@ -367,6 +367,9 @@ void register_disk(struct gendisk *disk)
return;
bdev = bdget_disk(disk, 0);
if (!bdev)
return;
if (blkdev_get(bdev, FMODE_READ, 0) < 0)
return;
state = check_partition(disk, bdev);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment