Received: by 2002:a25:d7c1:0:0:0:0:0 with SMTP id o184csp3971498ybg; Mon, 28 Oct 2019 23:42:06 -0700 (PDT) X-Google-Smtp-Source: APXvYqz1HEVf+pfbUh81xrzMlq9aQ68ApbMzTe0cyRzKi6W6JZ7R9UVRCodMWoH3jCABFyTpd30N X-Received: by 2002:a17:906:3010:: with SMTP id 16mr1664240ejz.74.1572331326516; Mon, 28 Oct 2019 23:42:06 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1572331326; cv=none; d=google.com; s=arc-20160816; b=EkJeouHtK3KqIlvsuBeYS6Psgmwl2s9ZswAHp//HN7UKFv0UG35OyJqxYmYC5A3st7 rCjJamDlfUdkkwr/8Zg4KSJgHLr2KHomm4O42ugiKz1/3VwZo371TOZmLfwuySfViBgM ieadim+HY7TaWCdXcgwJoMkOS4p/WDGFM3o/KFqsyeGbteJCdOuQ/jKAyYs+wdaqOqZs xJfxcRa/vn505tcT/2+yIwAQMFPWfhwxK9/433cz4achasVwG6uNKQYLBTjQO7RR86bT 0NS0p3Sa3NR49qOcXlLfLUHtAnZG+K/mm/lHlf1mQfEiS02UtDzIsJ7qj562Nm1EKzPR 8X2w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:content-disposition :mime-version:message-id:subject:cc:to:from:date:dkim-signature; bh=KooIewZwbvjOkWEaBdb5ogJ6e+TbvWJNeEYKOS8P4w0=; b=UHOBhlF97zzHHZzcHFjKJr8bvXUXlUPEqVAyuVQnltYY50TV4wrnoHI+S7l1PXVPFE 9xx4MRlpnU4yzrhZ/jiKq6DXi81X4lrScoqARAm2EhJCsQH4rZorXl6sOZtNwQEGjEv+ +ugqDtKxyzj7P+f5CFRV/iKsGK4cKRwJ6mXP2OIx/QT3w5eHlUbKeGccfiNiarLVmP4z +or99+KhO5yB0ooFt3lt6N7aFnlNZ33jA1L0n8i9DtCceoL9sLUNwnqouSgYuQP8oeYp zXn36IoRbBSeqCaE81qOZvmCkxZtXMEOAgPr7wpbSVHQEBvx8eGtekxKx0i+ZYFeFWTu wDHA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=Y1PKiPJS; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id z65si10032670ede.388.2019.10.28.23.41.43; Mon, 28 Oct 2019 23:42:06 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=Y1PKiPJS; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2404328AbfJ1SHm (ORCPT + 99 others); Mon, 28 Oct 2019 14:07:42 -0400 Received: from mail-pg1-f194.google.com ([209.85.215.194]:34305 "EHLO mail-pg1-f194.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1730690AbfJ1SHm (ORCPT ); Mon, 28 Oct 2019 14:07:42 -0400 Received: by mail-pg1-f194.google.com with SMTP id e4so3113800pgs.1 for ; Mon, 28 Oct 2019 11:07:42 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=date:from:to:cc:subject:message-id:mime-version:content-disposition :user-agent; bh=KooIewZwbvjOkWEaBdb5ogJ6e+TbvWJNeEYKOS8P4w0=; b=Y1PKiPJSo5cC4StnmwLOwPxBIOiH1/YjuhzkGWx/4kjWfWLT96mT2xSrwfVi7yHFEl Nh5NKHRthKhTX38td42WJaxB7C3k4RnOtzAnd/+cwXMPAkE3gXJcIgkRB0vVN8o9bcN4 KAp7kN+geHLFssZe5717qy+JPk/T5xKxDrkTMcvlXZmievm/WR8G9YLZjh9nakfkEi8c DuqWxZHoTQVwkP3WRh337YW3LM5Mvc9mLDhNNXAY5c6wXqksrU5cSXZO2Ga09wU9SwfR LCosxU8Rahy9Gs3YHw1vnjY/XZ7JWwuSclzwONsO/L1nul6Ksh4YXaEw13q3UQ39M2GX TZIA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:mime-version :content-disposition:user-agent; bh=KooIewZwbvjOkWEaBdb5ogJ6e+TbvWJNeEYKOS8P4w0=; b=RgZh0h5ivQ73tZnpLSm1IGg07nxvHq9SBwghJiPNvdnaXKY6VybD1OvPe0bqvWjzeY yNlSCdNHRwvTLP8k1wga6Rb30T5+Btec7Yn5SEYsliDY1JLLSuzCOkyw9O+AuesuSg4R B14co3VGvBTwscviACiJasGV3/ogmslIv6j7b5dOF5nQNZqaxLy9voxTwpu7NaF6TMUo 7s9O0QqWd4HoBL5MyKpynttCfrsaqRE4yZM/dpRlSR/002AjAf/WRMqX6Y72XEMyglZ4 UF0a/bVaYXU/CHZLW9XSjCFW3kUjlqOoIoqyAgLLvnIR63aDSIftjv3cw5XkqOCVmRX6 osKA== X-Gm-Message-State: APjAAAVs4cvwpx8bRGr/iO9B8PaEJ4xNmtQlyGpOJHZj/+DPFa3ke8QV aG5+NNL+b0UjRhasMNUJ70c= X-Received: by 2002:a17:90a:37e4:: with SMTP id v91mr773608pjb.8.1572286061510; Mon, 28 Oct 2019 11:07:41 -0700 (PDT) Received: from saurav ([27.62.167.137]) by smtp.gmail.com with ESMTPSA id i102sm168856pje.17.2019.10.28.11.07.37 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 28 Oct 2019 11:07:40 -0700 (PDT) Date: Mon, 28 Oct 2019 23:37:33 +0530 From: Saurav Girepunje To: joern@lazybastard.org, dwmw2@infradead.org, computersforpeace@gmail.com, marek.vasut@gmail.com, miquel.raynal@bootlin.com, richard@nod.at, vigneshr@ti.com, linux-mtd@lists.infradead.org, linux-kernel@vger.kernel.org Cc: saurav.girepunje@hotmail.com Subject: [PATCH] mtd: devices: phram.c: Fix multiple kfree statement from phram_setup] Message-ID: <20191028180733.GA26168@saurav> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.10.1 (2018-07-13) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Remove multiple kfree statement from phram_setup() in phram.c Signed-off-by: Saurav Girepunje --- drivers/mtd/devices/phram.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/drivers/mtd/devices/phram.c b/drivers/mtd/devices/phram.c index c467286ca007..38f95a1517ac 100644 --- a/drivers/mtd/devices/phram.c +++ b/drivers/mtd/devices/phram.c @@ -243,22 +243,22 @@ static int phram_setup(const char *val) ret = parse_num64(&start, token[1]); if (ret) { - kfree(name); parse_err("illegal start address\n"); + goto free_nam; } ret = parse_num64(&len, token[2]); if (ret) { - kfree(name); parse_err("illegal device length\n"); + goto free_nam; } ret = register_device(name, start, len); if (!ret) pr_info("%s device: %#llx at %#llx\n", name, len, start); - else - kfree(name); +free_nam: + kfree(name); return ret; } -- 2.20.1