summaryrefslogtreecommitdiffstats
path: root/fs/partitions
diff options
context:
space:
mode:
Diffstat (limited to 'fs/partitions')
-rw-r--r--fs/partitions/check.c7
1 files changed, 1 insertions, 6 deletions
diff --git a/fs/partitions/check.c b/fs/partitions/check.c
index f0f604950ff..87298c0fc8c 100644
--- a/fs/partitions/check.c
+++ b/fs/partitions/check.c
@@ -134,12 +134,7 @@ char *disk_name(struct gendisk *hd, int partno, char *buf)
const char *bdevname(struct block_device *bdev, char *buf)
{
- int partno = 0;
-
- if (bdev->bd_part)
- partno = bdev->bd_part->partno;
-
- return disk_name(bdev->bd_disk, partno, buf);
+ return disk_name(bdev->bd_disk, bdev->bd_part->partno, buf);
}
EXPORT_SYMBOL(bdevname);