summaryrefslogtreecommitdiff
path: root/arch/powerpc/platforms/pseries/dlpar.c
diff options
context:
space:
mode:
authorMarkus Elfring <elfring@users.sourceforge.net>2019-08-27 13:34:02 +0200
committerMichael Ellerman <mpe@ellerman.id.au>2021-01-31 22:35:50 +1100
commitde060ac83e5c1fe5fb8c505a4e99c1fe4f70ff94 (patch)
tree82f31bf477ddef43e37cee801ea400209c77dba8 /arch/powerpc/platforms/pseries/dlpar.c
parent245a389c6ded15a7d308dbe988aec8a96e8aa8cf (diff)
powerpc/pseries: Delete an unnecessary kfree() call in dlpar_store()
A null pointer would be passed to a call of the function “kfree” immediately after a call of the function “kstrdup” failed at one place. Remove this superfluous function call. This issue was detected by using the Coccinelle software. Signed-off-by: Markus Elfring <elfring@users.sourceforge.net> Acked-by: Nathan Lynch <nathanl@linux.ibm.com> Signed-off-by: Michael Ellerman <mpe@ellerman.id.au> Link: https://lore.kernel.org/r/b46cc4ff-a14c-0c10-0c0c-95573a960178@web.de
Diffstat (limited to 'arch/powerpc/platforms/pseries/dlpar.c')
-rw-r--r--arch/powerpc/platforms/pseries/dlpar.c1
1 files changed, 0 insertions, 1 deletions
diff --git a/arch/powerpc/platforms/pseries/dlpar.c b/arch/powerpc/platforms/pseries/dlpar.c
index 16e86ba8aa20..2a783dc0cfa7 100644
--- a/arch/powerpc/platforms/pseries/dlpar.c
+++ b/arch/powerpc/platforms/pseries/dlpar.c
@@ -523,7 +523,6 @@ static ssize_t dlpar_store(struct class *class, struct class_attribute *attr,
args = argbuf = kstrdup(buf, GFP_KERNEL);
if (!argbuf) {
pr_info("Could not allocate resources for DLPAR operation\n");
- kfree(argbuf);
return -ENOMEM;
}