summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--block/genhd.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/block/genhd.c b/block/genhd.c
index 32ee73c..ed926b7 100644
--- a/block/genhd.c
+++ b/block/genhd.c
@@ -584,7 +584,7 @@ struct block_device *bdget_disk(struct gendisk *disk, int partno)
struct block_device *bdev = NULL;
part = disk_get_part(disk, partno);
- if (part && (part->nr_sects || partno == 0))
+ if (part)
bdev = bdget(part_devt(part));
disk_put_part(part);
@@ -1031,7 +1031,7 @@ dev_t blk_lookup_devt(const char *name, int partno)
continue;
part = disk_get_part(disk, partno);
- if (part && (part->nr_sects || partno == 0)) {
+ if (part) {
devt = part_devt(part);
disk_put_part(part);
break;
OpenPOWER on IntegriCloud