summaryrefslogtreecommitdiffstats
path: root/drivers/reset
diff options
context:
space:
mode:
authorNeil Armstrong <narmstrong@baylibre.com>2017-10-17 12:19:34 +0200
committerPhilipp Zabel <p.zabel@pengutronix.de>2017-10-17 13:05:56 +0200
commit7e8838fe59515860823233353227e89b82b8794e (patch)
tree650e5e1143c86de2202e62ab9bb0484c5beb9c5f /drivers/reset
parenta5a10afe04efad46e8eec20f70b7b91a411fcd8e (diff)
downloadlinux-7e8838fe59515860823233353227e89b82b8794e.tar.bz2
reset: meson: remove unneeded check in meson_reset_reset
The if (bank >= REG_COUNT) is not need since already checked by the default rcdev->of_xlate implementation which guarantees that id < rcdev->nr_resets. Suggested-by: Philipp Zabel <p.zabel@pengutronix.de> Signed-off-by: Neil Armstrong <narmstrong@baylibre.com> Signed-off-by: Philipp Zabel <p.zabel@pengutronix.de>
Diffstat (limited to 'drivers/reset')
-rw-r--r--drivers/reset/reset-meson.c3
1 files changed, 0 insertions, 3 deletions
diff --git a/drivers/reset/reset-meson.c b/drivers/reset/reset-meson.c
index f3b9d6989267..c419a3753d00 100644
--- a/drivers/reset/reset-meson.c
+++ b/drivers/reset/reset-meson.c
@@ -83,9 +83,6 @@ static int meson_reset_reset(struct reset_controller_dev *rcdev,
unsigned int offset = id % BITS_PER_REG;
void __iomem *reg_addr = data->reg_base + (bank << 2);
- if (bank >= REG_COUNT)
- return -EINVAL;
-
writel(BIT(offset), reg_addr);
return 0;