diff options
Diffstat (limited to 'drivers/input/keyboard/nspire-keypad.c')
-rw-r--r-- | drivers/input/keyboard/nspire-keypad.c | 7 |
1 files changed, 1 insertions, 6 deletions
diff --git a/drivers/input/keyboard/nspire-keypad.c b/drivers/input/keyboard/nspire-keypad.c index 20d872d6f603..b3e3edab6d9f 100644 --- a/drivers/input/keyboard/nspire-keypad.c +++ b/drivers/input/keyboard/nspire-keypad.c @@ -171,12 +171,6 @@ static int nspire_keypad_probe(struct platform_device *pdev) return -EINVAL; } - res = platform_get_resource(pdev, IORESOURCE_MEM, 0); - if (!res) { - dev_err(&pdev->dev, "missing platform resources\n"); - return -EINVAL; - } - keypad = devm_kzalloc(&pdev->dev, sizeof(struct nspire_keypad), GFP_KERNEL); if (!keypad) { @@ -208,6 +202,7 @@ static int nspire_keypad_probe(struct platform_device *pdev) return PTR_ERR(keypad->clk); } + res = platform_get_resource(pdev, IORESOURCE_MEM, 0); keypad->reg_base = devm_ioremap_resource(&pdev->dev, res); if (IS_ERR(keypad->reg_base)) return PTR_ERR(keypad->reg_base); |