From 7e8838fe59515860823233353227e89b82b8794e Mon Sep 17 00:00:00 2001 From: Neil Armstrong Date: Tue, 17 Oct 2017 12:19:34 +0200 Subject: 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 Signed-off-by: Neil Armstrong Signed-off-by: Philipp Zabel --- drivers/reset/reset-meson.c | 3 --- 1 file changed, 3 deletions(-) (limited to 'drivers/reset') 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; -- cgit v1.2.3