diff options
author | Sylwester Nawrocki <s.nawrocki@samsung.com> | 2016-09-01 07:59:00 -0400 |
---|---|---|
committer | Linus Walleij <linus.walleij@linaro.org> | 2016-09-12 09:45:16 -0400 |
commit | b09eed7f811de64f1352634baa48ca8aecddac51 (patch) | |
tree | 066ecf813ec80b059bfbdbdd1252b8cffeb705a4 /drivers/pinctrl | |
parent | c11a0442b0fe01244de09849f62a0370482a0196 (diff) |
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')
-rw-r--r-- | drivers/pinctrl/samsung/pinctrl-samsung.c | 10 |
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) | |||
1041 | struct resource *res; | 1041 | struct resource *res; |
1042 | int ret; | 1042 | int ret; |
1043 | 1043 | ||
1044 | if (!dev->of_node) { | ||
1045 | dev_err(dev, "device tree node not found\n"); | ||
1046 | return -ENODEV; | ||
1047 | } | ||
1048 | |||
1049 | drvdata = devm_kzalloc(dev, sizeof(*drvdata), GFP_KERNEL); | 1044 | drvdata = devm_kzalloc(dev, sizeof(*drvdata), GFP_KERNEL); |
1050 | if (!drvdata) { | 1045 | if (!drvdata) |
1051 | dev_err(dev, "failed to allocate memory for driver's " | ||
1052 | "private data\n"); | ||
1053 | return -ENOMEM; | 1046 | return -ENOMEM; |
1054 | } | ||
1055 | 1047 | ||
1056 | ctrl = samsung_pinctrl_get_soc_data(drvdata, pdev); | 1048 | ctrl = samsung_pinctrl_get_soc_data(drvdata, pdev); |
1057 | if (IS_ERR(ctrl)) { | 1049 | if (IS_ERR(ctrl)) { |