Revert "block: fix potential invalid pointer dereference in blk_add_partition"
This reverts commit f081315218
.
This commit is contained in:
parent
47123ae968
commit
b18c91a11b
1 changed files with 3 additions and 5 deletions
|
@ -691,11 +691,9 @@ static bool blk_add_partition(struct gendisk *disk, struct block_device *bdev,
|
|||
|
||||
part = add_partition(disk, p, from, size, state->parts[p].flags,
|
||||
&state->parts[p].info);
|
||||
if (IS_ERR(part)) {
|
||||
if (PTR_ERR(part) != -ENXIO) {
|
||||
printk(KERN_ERR " %s: p%d could not be added: %pe\n",
|
||||
disk->disk_name, p, part);
|
||||
}
|
||||
if (IS_ERR(part) && PTR_ERR(part) != -ENXIO) {
|
||||
printk(KERN_ERR " %s: p%d could not be added: %pe\n",
|
||||
disk->disk_name, p, part);
|
||||
return true;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue