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

pinctrl: tz1090: 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
8c017679 7598160d

+3 -6
+3 -6
drivers/pinctrl/pinctrl-tz1090.c
··· 1082 1082 1083 1083 dup_configs = kmemdup(configs, num_configs * sizeof(*dup_configs), 1084 1084 GFP_KERNEL); 1085 - if (!dup_configs) { 1086 - dev_err(dev, "kmemdup(configs) failed\n"); 1085 + if (!dup_configs) 1087 1086 return -ENOMEM; 1088 - } 1089 1087 1090 1088 (*map)[*num_maps].type = PIN_MAP_TYPE_CONFIGS_GROUP; 1091 1089 (*map)[*num_maps].data.configs.group_or_pin = group; ··· 1944 1946 struct resource *res; 1945 1947 1946 1948 pmx = devm_kzalloc(&pdev->dev, sizeof(*pmx), GFP_KERNEL); 1947 - if (!pmx) { 1948 - dev_err(&pdev->dev, "Can't alloc tz1090_pmx\n"); 1949 + if (!pmx) 1949 1950 return -ENOMEM; 1950 - } 1951 + 1951 1952 pmx->dev = &pdev->dev; 1952 1953 spin_lock_init(&pmx->lock); 1953 1954