From patchwork Tue Aug 27 12:42:27 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Markus Elfring X-Patchwork-Id: 1153821 Return-Path: X-Original-To: patchwork-incoming@ozlabs.org Delivered-To: patchwork-incoming@ozlabs.org Received: from lists.ozlabs.org (lists.ozlabs.org [IPv6:2401:3900:2:1::3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 46HpXn0Gpjz9sDQ for ; Tue, 27 Aug 2019 22:46:49 +1000 (AEST) Authentication-Results: ozlabs.org; dmarc=none (p=none dis=none) header.from=web.de Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (1024-bit key; secure) header.d=web.de header.i=@web.de header.b="pwG+CVZu"; dkim-atps=neutral Received: from bilbo.ozlabs.org (lists.ozlabs.org [IPv6:2401:3900:2:1::3]) by lists.ozlabs.org (Postfix) with ESMTP id 46HpXm47BtzDqSc for ; Tue, 27 Aug 2019 22:46:48 +1000 (AEST) X-Original-To: linuxppc-dev@lists.ozlabs.org Delivered-To: linuxppc-dev@lists.ozlabs.org Authentication-Results: lists.ozlabs.org; spf=pass (mailfrom) smtp.mailfrom=web.de (client-ip=217.72.192.78; helo=mout.web.de; envelope-from=markus.elfring@web.de; receiver=) Authentication-Results: lists.ozlabs.org; dmarc=none (p=none dis=none) header.from=web.de Authentication-Results: lists.ozlabs.org; dkim=pass (1024-bit key; secure) header.d=web.de header.i=@web.de header.b="pwG+CVZu"; dkim-atps=neutral Received: from mout.web.de (mout.web.de [217.72.192.78]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by lists.ozlabs.org (Postfix) with ESMTPS id 46HpSW1cDKzDqWN for ; Tue, 27 Aug 2019 22:43:06 +1000 (AEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=web.de; s=dbaedf251592; t=1566909753; bh=VC2QvdrCbaIt/LdFIIg3zDvmOueJw0EM+bO6qh1H3L4=; h=X-UI-Sender-Class:Subject:From:To:Cc:References:Date:In-Reply-To; b=pwG+CVZucPG8JjqlnehbcRjJozmGGyTXoTkiP99gnoddZAl9GFkv/6lOpCHCKZM1E 3avbZof5rDBOJ3VExrH127oMHHoQLL3XQgGaGT1L9zHOe5FS6uMEvPq42KYcWlxYAh /MCv3BUSJ45+XccYI82z9wG7p5ph0DNrgo7gQ15o= X-UI-Sender-Class: c548c8c5-30a9-4db5-a2e7-cb6cb037b8f9 Received: from [192.168.1.2] ([93.135.143.232]) by smtp.web.de (mrweb103 [213.165.67.124]) with ESMTPSA (Nemesis) id 0MfYj1-1hrxpq0FXX-00P4Oc; Tue, 27 Aug 2019 14:42:33 +0200 Subject: [PATCH 1/2] powerpc/pseries: Delete an unnecessary kfree() call in dlpar_store() From: Markus Elfring To: linuxppc-dev@lists.ozlabs.org, Allison Randal , Benjamin Herrenschmidt , Frank Rowand , Gen Zhang , Greg Kroah-Hartman , Michael Ellerman , Nathan Fontenot , Nathan Lynch , Oliver O'Halloran , Paul Mackerras , Thomas Gleixner References: Openpgp: preference=signencrypt Autocrypt: addr=Markus.Elfring@web.de; prefer-encrypt=mutual; keydata= mQINBFg2+xABEADBJW2hoUoFXVFWTeKbqqif8VjszdMkriilx90WB5c0ddWQX14h6w5bT/A8 +v43YoGpDNyhgA0w9CEhuwfZrE91GocMtjLO67TAc2i2nxMc/FJRDI0OemO4VJ9RwID6ltwt mpVJgXGKkNJ1ey+QOXouzlErVvE2fRh+KXXN1Q7fSmTJlAW9XJYHS3BDHb0uRpymRSX3O+E2 lA87C7R8qAigPDZi6Z7UmwIA83ZMKXQ5stA0lhPyYgQcM7fh7V4ZYhnR0I5/qkUoxKpqaYLp YHBczVP+Zx/zHOM0KQphOMbU7X3c1pmMruoe6ti9uZzqZSLsF+NKXFEPBS665tQr66HJvZvY GMDlnt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N3ETVNQoGgMzPVWIRElwpcXr+yGoTLAOpG7nkAUBBj9n9TPpSdt/npfok9ZfL /Q+ranrxb2Cy4tvOPxeVfR58XveX85ICrW9VHPVq9sJf/a24bMm6+qEg1V/G7u/AM3fM8U2m tdrTqOrfxklZ7beppGKzC1/WLrcr072vrdiN0icyOHQlfWmaPv0pUnW3AwtiMYngT96BevfA qlwaymjPTvH+cTXScnbydfOQW8220JQwykUe+sHRZfAF5TS2YCkQvsyf7vIpSqo/ttDk4+xc Z/wsLiWTgKlih2QYULvW61XU+mWsK8+ZlYUrRMpkauN4CJ5yTpvp+Orcz5KixHQmc5tbkLWf x0n1QFc1xxJhbzN+r9djSGGN/5IBDfUqSANC8cWzHpWaHmSuU3JSAMB/N+yQjIad2ztTckZY pwT6oxng29LzZspTYUEzMz3wK2jQHw+U66qBFk8whA7B2uAU1QdGyPgahLYSOa4XAEGb6wbI FEE= Message-ID: Date: Tue, 27 Aug 2019 14:42:27 +0200 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.8.0 MIME-Version: 1.0 In-Reply-To: Content-Language: en-US X-Provags-ID: V03:K1:4WbKfj3BMvlzyZRPacSeaIx1Hkpgixn4uWiCQuxbneWkPrJ3uyx TOTDWsRUPVY9da5sgdHIjVoAwfYoxYUexRity68kBdvVFVHA5NIt3XrfuUpFMQgk8FcXN3Q mc/NVjFTFEOECc/PPRDTND9T0QyG9bV6Hgc7BkZlXMZIUQBK6QSVmM+AqZqSbxPNuwLSAoh SlqY/s0fgHYK2n6sjG2gw== X-Spam-Flag: NO X-UI-Out-Filterresults: notjunk:1; V03:K0:oWUI2J2XIEU=:n++pVAsRItNYxnfeygvcpy jG0XfKVcVv3MGWR69K/EGv320erIJuow9YxFCL8kqY7qfm4YQpI79sXnFts+EDhkR41q6fKjI xvGtViLhvFjLPVfI1i8aIJ8/gKhbE1QrIYqjNfJkPKQJTTmmQHq19Z+l7f5aSwEJe35L1Reb6 0PeanOV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list List-Id: Linux on PowerPC Developers Mail List List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: kernel-janitors@vger.kernel.org, LKML Errors-To: linuxppc-dev-bounces+patchwork-incoming=ozlabs.org@lists.ozlabs.org Sender: "Linuxppc-dev" From: Markus Elfring Date: Tue, 27 Aug 2019 13:34:02 +0200 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 Acked-by: Nathan Lynch --- arch/powerpc/platforms/pseries/dlpar.c | 1 - 1 file changed, 1 deletion(-) -- 2.23.0 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; }