Prechádzať zdrojové kódy

regulator: Remove a redundant device_remove_file call in create_regulator

We already have device_remove_file() in error path,
no need to call it before goto link_name_err.

Signed-off-by: Axel Lin <axel.lin@gmail.com>
Acked-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Signed-off-by: Liam Girdwood <lrg@slimlogic.co.uk>
Axel Lin 14 rokov pred
rodič
commit
aa7a74040a
1 zmenil súbory, kde vykonal 0 pridanie a 1 odobranie
  1. 0 1
      drivers/regulator/core.c

+ 0 - 1
drivers/regulator/core.c

@@ -1052,7 +1052,6 @@ static struct regulator *create_regulator(struct regulator_dev *rdev,
 			printk(KERN_WARNING
 			printk(KERN_WARNING
 			       "%s: could not add device link %s err %d\n",
 			       "%s: could not add device link %s err %d\n",
 			       __func__, dev->kobj.name, err);
 			       __func__, dev->kobj.name, err);
-			device_remove_file(dev, &regulator->dev_attr);
 			goto link_name_err;
 			goto link_name_err;
 		}
 		}
 	}
 	}