diff options
author | Markus Elfring <elfring@users.sourceforge.net> | 2017-12-27 22:04:22 +0100 |
---|---|---|
committer | Linus Walleij <linus.walleij@linaro.org> | 2017-12-28 13:41:02 +0100 |
commit | 203f4b0651cd4153bb3530ae4af63b5190cbe939 (patch) | |
tree | 8340fce77a79f07187d96e0ed04880b56eb89687 /drivers/pinctrl/qcom | |
parent | ce8b8d70d4d8d6351be44a467a2b61096dfc7a47 (diff) |
pinctrl: msm: Delete an error message for a failed memory allocation in msm_pinctrl_probe()
Omit an extra message for a memory allocation failure in this function.
This issue was detected by using the Coccinelle software.
Signed-off-by: Markus Elfring <elfring@users.sourceforge.net>
Acked-by: Bjorn Andersson <bjorn.andersson@linaro.org>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
Diffstat (limited to 'drivers/pinctrl/qcom')
-rw-r--r-- | drivers/pinctrl/qcom/pinctrl-msm.c | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/drivers/pinctrl/qcom/pinctrl-msm.c b/drivers/pinctrl/qcom/pinctrl-msm.c index 7a960590ecaa..495432f3341b 100644 --- a/drivers/pinctrl/qcom/pinctrl-msm.c +++ b/drivers/pinctrl/qcom/pinctrl-msm.c @@ -898,10 +898,9 @@ int msm_pinctrl_probe(struct platform_device *pdev, int ret; pctrl = devm_kzalloc(&pdev->dev, sizeof(*pctrl), GFP_KERNEL); - if (!pctrl) { - dev_err(&pdev->dev, "Can't allocate msm_pinctrl\n"); + if (!pctrl) return -ENOMEM; - } + pctrl->dev = &pdev->dev; pctrl->soc = soc_data; pctrl->chip = msm_gpio_template; |