summaryrefslogtreecommitdiff
path: root/drivers/reset
diff options
context:
space:
mode:
authorFlorian Fainelli <f.fainelli@gmail.com>2019-11-04 21:15:02 +0300
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2020-01-17 21:48:29 +0300
commitc993cba53c07fba310f3a462762ad100747396a5 (patch)
treed40d6e7d3aac580b28849ee3cd25d285ac145103 /drivers/reset
parent05b41913ac6f48faadab48057437b31646abe7b5 (diff)
downloadlinux-c993cba53c07fba310f3a462762ad100747396a5.tar.xz
reset: brcmstb: Remove resource checks
commit ce89d8d3a70fa530e16f0b0f8994385a214cd0c0 upstream. The use of IS_ALIGNED() is incorrect, the typical resource we pass looks like this: start: 0x8404318, size: 0x30. When using IS_ALIGNED() we will get the following 0x8404318 & (0x18 - 1) = 0x10 which is definitively not equal to 0, same goes with the size. These two checks would make the driver fail probing. Remove the resource checks, since there should be no constraint on the base addresse or size. Fixes: 77750bc089e4 ("reset: Add Broadcom STB SW_INIT reset controller driver") Signed-off-by: Florian Fainelli <f.fainelli@gmail.com> Signed-off-by: Philipp Zabel <p.zabel@pengutronix.de> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/reset')
-rw-r--r--drivers/reset/reset-brcmstb.c6
1 files changed, 0 insertions, 6 deletions
diff --git a/drivers/reset/reset-brcmstb.c b/drivers/reset/reset-brcmstb.c
index a608f445dad6..f213264c8567 100644
--- a/drivers/reset/reset-brcmstb.c
+++ b/drivers/reset/reset-brcmstb.c
@@ -91,12 +91,6 @@ static int brcmstb_reset_probe(struct platform_device *pdev)
return -ENOMEM;
res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
- if (!IS_ALIGNED(res->start, SW_INIT_BANK_SIZE) ||
- !IS_ALIGNED(resource_size(res), SW_INIT_BANK_SIZE)) {
- dev_err(kdev, "incorrect register range\n");
- return -EINVAL;
- }
-
priv->base = devm_ioremap_resource(kdev, res);
if (IS_ERR(priv->base))
return PTR_ERR(priv->base);