reset: check return value of reset_controller_register()

Currently, reset_controller_register() always return 0, but it would
be better to check its return code.

Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
Acked-by: Sören Brinkmann <soren.brinkmann@xilinx.com>
Signed-off-by: Philipp Zabel <p.zabel@pengutronix.de>
This commit is contained in:
Masahiro Yamada 2015-11-05 14:54:56 +09:00 committed by Philipp Zabel
parent 5b321a631a
commit d1f15aa095
4 changed files with 4 additions and 9 deletions

View File

@ -87,9 +87,7 @@ static int berlin2_reset_probe(struct platform_device *pdev)
priv->rcdev.of_reset_n_cells = 2; priv->rcdev.of_reset_n_cells = 2;
priv->rcdev.of_xlate = berlin_reset_xlate; priv->rcdev.of_xlate = berlin_reset_xlate;
reset_controller_register(&priv->rcdev); return reset_controller_register(&priv->rcdev);
return 0;
} }
static const struct of_device_id berlin_reset_dt_match[] = { static const struct of_device_id berlin_reset_dt_match[] = {

View File

@ -133,9 +133,8 @@ static int socfpga_reset_probe(struct platform_device *pdev)
data->rcdev.nr_resets = NR_BANKS * BITS_PER_LONG; data->rcdev.nr_resets = NR_BANKS * BITS_PER_LONG;
data->rcdev.ops = &socfpga_reset_ops; data->rcdev.ops = &socfpga_reset_ops;
data->rcdev.of_node = pdev->dev.of_node; data->rcdev.of_node = pdev->dev.of_node;
reset_controller_register(&data->rcdev);
return 0; return reset_controller_register(&data->rcdev);
} }
static int socfpga_reset_remove(struct platform_device *pdev) static int socfpga_reset_remove(struct platform_device *pdev)

View File

@ -108,9 +108,8 @@ static int sunxi_reset_init(struct device_node *np)
data->rcdev.nr_resets = size * 32; data->rcdev.nr_resets = size * 32;
data->rcdev.ops = &sunxi_reset_ops; data->rcdev.ops = &sunxi_reset_ops;
data->rcdev.of_node = np; data->rcdev.of_node = np;
reset_controller_register(&data->rcdev);
return 0; return reset_controller_register(&data->rcdev);
err_alloc: err_alloc:
kfree(data); kfree(data);

View File

@ -121,9 +121,8 @@ static int zynq_reset_probe(struct platform_device *pdev)
priv->rcdev.nr_resets = resource_size(res) / 4 * BITS_PER_LONG; priv->rcdev.nr_resets = resource_size(res) / 4 * BITS_PER_LONG;
priv->rcdev.ops = &zynq_reset_ops; priv->rcdev.ops = &zynq_reset_ops;
priv->rcdev.of_node = pdev->dev.of_node; priv->rcdev.of_node = pdev->dev.of_node;
reset_controller_register(&priv->rcdev);
return 0; return reset_controller_register(&priv->rcdev);
} }
static int zynq_reset_remove(struct platform_device *pdev) static int zynq_reset_remove(struct platform_device *pdev)