Skip to content

Commit

Permalink
block/partition-generic.c: Remove a set-but-not-used variable
Browse files Browse the repository at this point in the history
A value is assigned to the variable 'info' but that value is never
used. Hence remove the variable 'info'.

Signed-off-by: Bart Van Assche <[email protected]>
Signed-off-by: Jens Axboe <[email protected]>
  • Loading branch information
Bart Van Assche authored and axboe committed Jun 14, 2016
1 parent 1a89694 commit aa8d15b
Showing 1 changed file with 0 additions and 3 deletions.
3 changes: 0 additions & 3 deletions block/partition-generic.c
Original file line number Diff line number Diff line change
Expand Up @@ -495,7 +495,6 @@ int rescan_partitions(struct gendisk *disk, struct block_device *bdev)
/* add partitions */
for (p = 1; p < state->limit; p++) {
sector_t size, from;
struct partition_meta_info *info = NULL;

size = state->parts[p].size;
if (!size)
Expand Down Expand Up @@ -530,8 +529,6 @@ int rescan_partitions(struct gendisk *disk, struct block_device *bdev)
}
}

if (state->parts[p].has_info)
info = &state->parts[p].info;
part = add_partition(disk, p, from, size,
state->parts[p].flags,
&state->parts[p].info);
Expand Down

0 comments on commit aa8d15b

Please sign in to comment.