summaryrefslogtreecommitdiffstats
path: root/drivers/reset/reset-sunxi.c
diff options
context:
space:
mode:
authorMasahiro Yamada <yamada.masahiro@socionext.com>2015-11-05 14:54:56 +0900
committerPhilipp Zabel <p.zabel@pengutronix.de>2015-11-16 09:23:47 +0100
commitd1f15aa09558d00ed23168686156f7341f9d9d86 (patch)
tree723cd6fa2b090484dd44550f31538b1d1fb74c02 /drivers/reset/reset-sunxi.c
parent5b321a631ab66c6ecf6aaa8a2059b61383e27096 (diff)
downloadblackbird-op-linux-d1f15aa09558d00ed23168686156f7341f9d9d86.tar.gz
blackbird-op-linux-d1f15aa09558d00ed23168686156f7341f9d9d86.zip
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>
Diffstat (limited to 'drivers/reset/reset-sunxi.c')
-rw-r--r--drivers/reset/reset-sunxi.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/drivers/reset/reset-sunxi.c b/drivers/reset/reset-sunxi.c
index 9353b2dd153f..8d41a18da17f 100644
--- a/drivers/reset/reset-sunxi.c
+++ b/drivers/reset/reset-sunxi.c
@@ -108,9 +108,8 @@ static int sunxi_reset_init(struct device_node *np)
data->rcdev.nr_resets = size * 32;
data->rcdev.ops = &sunxi_reset_ops;
data->rcdev.of_node = np;
- reset_controller_register(&data->rcdev);
- return 0;
+ return reset_controller_register(&data->rcdev);
err_alloc:
kfree(data);
OpenPOWER on IntegriCloud