Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

pinctrl: tz1090-pdc: Delete an error message for a failed memory allocation in two functions

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 <elfring@users.sourceforge.net>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>

authored by

Markus Elfring and committed by
Linus Walleij
405e64a1 8c017679

+3 -6
+3 -6
drivers/pinctrl/pinctrl-tz1090-pdc.c
··· 357 357 358 358 dup_configs = kmemdup(configs, num_configs * sizeof(*dup_configs), 359 359 GFP_KERNEL); 360 - if (!dup_configs) { 361 - dev_err(dev, "kmemdup(configs) failed\n"); 360 + if (!dup_configs) 362 361 return -ENOMEM; 363 - } 364 362 365 363 /* 366 364 * We support both pins and pin groups, but we need to figure out which ··· 929 931 struct resource *res; 930 932 931 933 pmx = devm_kzalloc(&pdev->dev, sizeof(*pmx), GFP_KERNEL); 932 - if (!pmx) { 933 - dev_err(&pdev->dev, "Can't alloc tz1090_pdc_pmx\n"); 934 + if (!pmx) 934 935 return -ENOMEM; 935 - } 936 + 936 937 pmx->dev = &pdev->dev; 937 938 spin_lock_init(&pmx->lock); 938 939