]> git.karo-electronics.de Git - linux-beck.git/commitdiff
reset: check return value of reset_controller_register()
authorMasahiro Yamada <yamada.masahiro@socionext.com>
Thu, 5 Nov 2015 05:54:56 +0000 (14:54 +0900)
committerPhilipp Zabel <p.zabel@pengutronix.de>
Mon, 16 Nov 2015 08:23:47 +0000 (09:23 +0100)
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>
drivers/reset/reset-berlin.c
drivers/reset/reset-socfpga.c
drivers/reset/reset-sunxi.c
drivers/reset/reset-zynq.c

index 3c922d37255c6d937ff5cd90ea995259aac55e90..970b1ad602938b2040cda2294304fe7ebb0f4fab 100644 (file)
@@ -87,9 +87,7 @@ static int berlin2_reset_probe(struct platform_device *pdev)
        priv->rcdev.of_reset_n_cells = 2;
        priv->rcdev.of_xlate = berlin_reset_xlate;
 
-       reset_controller_register(&priv->rcdev);
-
-       return 0;
+       return reset_controller_register(&priv->rcdev);
 }
 
 static const struct of_device_id berlin_reset_dt_match[] = {
index 1a6c5d66c83bb10f352f3b16681fce54d2b5dd47..b7d773d9248cdc5456ef587b85f4a91e42c4659a 100644 (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.ops = &socfpga_reset_ops;
        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)
index 9353b2dd153f422b0f4b62cd4eb6844dc1420201..8d41a18da17f63cd853ab2376b422ffc5227f5e3 100644 (file)
@@ -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);
index 89318a5d5bd78590d7319c05628af23e98a0e878..c6b3cd8b40ad7b2214fa4cb5112d99facf960737 100644 (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.ops = &zynq_reset_ops;
        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)