|
@@ -223,12 +223,13 @@ static int aspeed_vuart_probe(struct platform_device *pdev)
|
|
|
if (IS_ERR(vuart->clk)) {
|
|
|
dev_warn(&pdev->dev,
|
|
|
"clk or clock-frequency not defined\n");
|
|
|
- return PTR_ERR(vuart->clk);
|
|
|
+ rc = PTR_ERR(vuart->clk);
|
|
|
+ goto err_sysfs_remove;
|
|
|
}
|
|
|
|
|
|
rc = clk_prepare_enable(vuart->clk);
|
|
|
if (rc < 0)
|
|
|
- return rc;
|
|
|
+ goto err_sysfs_remove;
|
|
|
|
|
|
clk = clk_get_rate(vuart->clk);
|
|
|
}
|
|
@@ -286,6 +287,8 @@ static int aspeed_vuart_probe(struct platform_device *pdev)
|
|
|
err_clk_disable:
|
|
|
clk_disable_unprepare(vuart->clk);
|
|
|
irq_dispose_mapping(port.port.irq);
|
|
|
+err_sysfs_remove:
|
|
|
+ sysfs_remove_group(&vuart->dev->kobj, &aspeed_vuart_attr_group);
|
|
|
return rc;
|
|
|
}
|
|
|
|