Revert "soc: versatile: realview: fix memory leak during device remove"
This reverts commit 0138ec8b13
.
This commit is contained in:
parent
e25b05e0b3
commit
18b674e3f4
1 changed files with 4 additions and 3 deletions
|
@ -93,7 +93,7 @@ static int realview_soc_probe(struct platform_device *pdev)
|
|||
if (IS_ERR(syscon_regmap))
|
||||
return PTR_ERR(syscon_regmap);
|
||||
|
||||
soc_dev_attr = devm_kzalloc(&pdev->dev, sizeof(*soc_dev_attr), GFP_KERNEL);
|
||||
soc_dev_attr = kzalloc(sizeof(*soc_dev_attr), GFP_KERNEL);
|
||||
if (!soc_dev_attr)
|
||||
return -ENOMEM;
|
||||
|
||||
|
@ -106,9 +106,10 @@ static int realview_soc_probe(struct platform_device *pdev)
|
|||
soc_dev_attr->family = "Versatile";
|
||||
soc_dev_attr->custom_attr_group = realview_groups[0];
|
||||
soc_dev = soc_device_register(soc_dev_attr);
|
||||
if (IS_ERR(soc_dev))
|
||||
if (IS_ERR(soc_dev)) {
|
||||
kfree(soc_dev_attr);
|
||||
return -ENODEV;
|
||||
|
||||
}
|
||||
ret = regmap_read(syscon_regmap, REALVIEW_SYS_ID_OFFSET,
|
||||
&realview_coreid);
|
||||
if (ret)
|
||||
|
|
Loading…
Add table
Reference in a new issue