diff options
author | Marcus Brinkmann <marcus@gnu.org> | 2000-09-19 01:11:18 +0000 |
---|---|---|
committer | Marcus Brinkmann <marcus@gnu.org> | 2000-09-19 01:11:18 +0000 |
commit | 856786d380a28a1f29ef97323ff363ccd626f376 (patch) | |
tree | 08dbe808b75dc30db9928ff4f259f5c07ce881d9 /linux | |
parent | 5e8e45c5dd03cf9830aad0b15fce26eab4a73c23 (diff) |
2000-09-19 Marcus Brinkmann <marcus@gnu.org>
* linux/dev/glue/block.c (init_partition): Move initialization
of MASK until it is asserted that gd is non-NULL.
Diffstat (limited to 'linux')
-rw-r--r-- | linux/dev/glue/block.c | 3 |
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 *) |