pinctrl: tz1090-pdc: Delete an error message for a failed memory allocation in two functions
Subsystems (3)
PATCH 1/1 pinctrl: tz1090-pdc: Delete an error message for a failed memory allocation in two functions
From: Markus Elfring <[email protected]>
Date: Mon, 25 Dec 2017 18:28:02 +0100
Omit an extra message for a memory allocation failure in these functions.
This issue was detected by using the Coccinelle software.
Signed-off-by Markus Elfring <[email protected]>
--- drivers/pinctrl/pinctrl-tz1090-pdc.c | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-)
drivers/pinctrl/pinctrl-tz1090-pdc.c +3 -6
@@ -357,10 +357,8 @@ static int add_map_configs(struct device *dev, dup_configs =kmemdup (configs, num_configs *sizeof (*dup_configs),GFP_KERNEL ); -if (!dup_configs) { -dev_err (dev,"kmemdup(configs) failed\n" ); +if (!dup_configs)return -ENOMEM ; - }/* * We support both pins and pin groups, but we need to figure out which
@@ -931,10 +929,9 @@ static int tz1090_pdc_pinctrl_probe(struct platform_device *pdev)struct resource *res; pmx =devm_kzalloc (&pdev->dev,sizeof (*pmx),GFP_KERNEL ); -if (!pmx) { -dev_err (&pdev->dev,"Can't alloc tz1090_pdc_pmx\n" ); +if (!pmx)return -ENOMEM ; - } + pmx->dev = &pdev->dev;spin_lock_init (&pmx->lock);
Signature · 1 line
2.15.1
Quoted 8 lines · SF Markus Elfring
From: Markus Elfring <[email protected]>
Date: Mon, 25 Dec 2017 18:28:02 +0100Omit an extra message for a memory allocation failure in these functions.
This issue was detected by using the Coccinelle software.
Signed-off-by Markus Elfring <[email protected]>
Patch applied.
Yours,
Linus Walleij