summaryrefslogtreecommitdiffstats
path: root/drivers/pinctrl/samsung
diff options
context:
space:
mode:
authorSylwester Nawrocki <s.nawrocki@samsung.com>2016-09-01 13:59:00 +0200
committerLinus Walleij <linus.walleij@linaro.org>2016-09-12 15:45:16 +0200
commitb09eed7f811de64f1352634baa48ca8aecddac51 (patch)
tree066ecf813ec80b059bfbdbdd1252b8cffeb705a4 /drivers/pinctrl/samsung
parentpinctrl: intel: merrifield: fix dup size in probe (diff)
downloadlinux-b09eed7f811de64f1352634baa48ca8aecddac51.tar.xz
linux-b09eed7f811de64f1352634baa48ca8aecddac51.zip
pinctrl: samsung: Remove an always false dev->of_node test
samsung_pinctrl_probe() can be called only after matching the driver by the compatible string so this already implies a non null dev->of_node. Remove the always false test and related error trace. While at it drop another error log in case of memory allocation failure - any errors are logged by the memory subsystem. Signed-off-by: Sylwester Nawrocki <s.nawrocki@samsung.com> Reviewed-by: Krzysztof Kozlowski <k.kozlowski@samsung.com> Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
Diffstat (limited to 'drivers/pinctrl/samsung')
-rw-r--r--drivers/pinctrl/samsung/pinctrl-samsung.c10
1 files changed, 1 insertions, 9 deletions
diff --git a/drivers/pinctrl/samsung/pinctrl-samsung.c b/drivers/pinctrl/samsung/pinctrl-samsung.c
index 513fe6b23248..620727fabe64 100644
--- a/drivers/pinctrl/samsung/pinctrl-samsung.c
+++ b/drivers/pinctrl/samsung/pinctrl-samsung.c
@@ -1041,17 +1041,9 @@ static int samsung_pinctrl_probe(struct platform_device *pdev)
struct resource *res;
int ret;
- if (!dev->of_node) {
- dev_err(dev, "device tree node not found\n");
- return -ENODEV;
- }
-
drvdata = devm_kzalloc(dev, sizeof(*drvdata), GFP_KERNEL);
- if (!drvdata) {
- dev_err(dev, "failed to allocate memory for driver's "
- "private data\n");
+ if (!drvdata)
return -ENOMEM;
- }
ctrl = samsung_pinctrl_get_soc_data(drvdata, pdev);
if (IS_ERR(ctrl)) {