summaryrefslogtreecommitdiff
path: root/linux/dev/glue/block.c
diff options
context:
space:
mode:
Diffstat (limited to 'linux/dev/glue/block.c')
-rw-r--r--linux/dev/glue/block.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/linux/dev/glue/block.c b/linux/dev/glue/block.c
index 5ca4456..12bcfca 100644
--- a/linux/dev/glue/block.c
+++ b/linux/dev/glue/block.c
@@ -937,13 +937,14 @@ init_partition (struct name_map *np, kdev_t *dev,
struct gendisk *gd = ds->gd;
struct partition *p;
struct temp_data *d = current_thread ()->pcb->data;
- unsigned mask = (1 << gd->minor_shift) - 1;
+ unsigned mask;
if (! gd)
{
*part = -1;
return 0;
}
+ mask = (1 << gd->minor_shift) - 1;
if (ds->labels)
goto check;
ds->labels = (struct disklabel **) kalloc (sizeof (struct disklabel *)