summaryrefslogtreecommitdiff
path: root/drivers/gpio/gpio-stp-xway.c
diff options
context:
space:
mode:
authorVarka Bhadram <varkabhadram@gmail.com>2014-10-21 11:12:59 +0400
committerLinus Walleij <linus.walleij@linaro.org>2014-10-28 19:06:40 +0300
commitd9b53c3c4ce0657000cad1efbbcd95fdd699a7b6 (patch)
treec75881383af11ea99001066b64cd8aafbf2dd9c8 /drivers/gpio/gpio-stp-xway.c
parent65fdc966c012b62ce4da5bf8175140a9b2ec2ee7 (diff)
downloadlinux-d9b53c3c4ce0657000cad1efbbcd95fdd699a7b6.tar.xz
gpio: gpio-stp-xway: remove duplicate check on resource
Sanity check on resource happening with devm_ioremap_resource(). Signed-off-by: Varka Bhadram <varkab@cdac.in> Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
Diffstat (limited to 'drivers/gpio/gpio-stp-xway.c')
-rw-r--r--drivers/gpio/gpio-stp-xway.c8
1 files changed, 2 insertions, 6 deletions
diff --git a/drivers/gpio/gpio-stp-xway.c b/drivers/gpio/gpio-stp-xway.c
index 7e359b7cce1b..7892e0fa8ba7 100644
--- a/drivers/gpio/gpio-stp-xway.c
+++ b/drivers/gpio/gpio-stp-xway.c
@@ -199,21 +199,17 @@ static int xway_stp_hw_init(struct xway_stp *chip)
static int xway_stp_probe(struct platform_device *pdev)
{
- struct resource *res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
+ struct resource *res;
const __be32 *shadow, *groups, *dsl, *phy;
struct xway_stp *chip;
struct clk *clk;
int ret = 0;
- if (!res) {
- dev_err(&pdev->dev, "failed to request STP resource\n");
- return -ENOENT;
- }
-
chip = devm_kzalloc(&pdev->dev, sizeof(*chip), GFP_KERNEL);
if (!chip)
return -ENOMEM;
+ res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
chip->virt = devm_ioremap_resource(&pdev->dev, res);
if (IS_ERR(chip->virt))
return PTR_ERR(chip->virt);