From patchwork Fri Oct 11 04:40:21 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Wei Yongjun X-Patchwork-Id: 282524 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from casper.infradead.org (casper.infradead.org [IPv6:2001:770:15f::2]) (using TLSv1.2 with cipher DHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by ozlabs.org (Postfix) with ESMTPS id 75B742C00A3 for ; Fri, 11 Oct 2013 15:41:04 +1100 (EST) Received: from merlin.infradead.org ([2001:4978:20e::2]) by casper.infradead.org with esmtps (Exim 4.80.1 #2 (Red Hat Linux)) id 1VUUWu-0008Ek-Th; Fri, 11 Oct 2013 04:40:49 +0000 Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.80.1 #2 (Red Hat Linux)) id 1VUUWt-0004Po-Ap; Fri, 11 Oct 2013 04:40:47 +0000 Received: from mail-bk0-x22f.google.com ([2a00:1450:4008:c01::22f]) by merlin.infradead.org with esmtps (Exim 4.80.1 #2 (Red Hat Linux)) id 1VUUWr-0004Oh-F6 for linux-mtd@lists.infradead.org; Fri, 11 Oct 2013 04:40:46 +0000 Received: by mail-bk0-f47.google.com with SMTP id mx12so1305798bkb.20 for ; Thu, 10 Oct 2013 21:40:23 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:date:message-id:subject:from:to:cc:content-type; bh=/JCN1RddXSjlW45iPgdz9lQ6WRHp2XNQC1d4a+nFAuY=; b=uVdYI2TFVsN2ofMLBvwDx+4FnwxDbdZzemO7X0yhmJ1QA9E+Wo4rg+mkcK0v2UDAF8 oiP3YcL4dhuxZEzE67+qXp+J0iN9hy8rpdgO8RJYmDU+4+X7i9ljXeYE1Uh0Z2peyHZ4 GDfnfPbBco8o9wj6hd0aYs4UoTRCGLrtUHfz8stDMhs3cLar3Obd8M8FFrpLmEC/CwrV iio4wfj8LMJfhMOBzgLUSd6CN6XJ35YO0XtQngQsLu5m34UVkUKFSgCSDT3XHKXTFKJr V+gOuZfkUS27T/WxeSOpbep3HrqWqJG0lQSZ7nOR4nUMdpgM25LJXHAwXZrIgJppKSLs 1/mQ== MIME-Version: 1.0 X-Received: by 10.204.60.66 with SMTP id o2mr15703230bkh.22.1381466421172; Thu, 10 Oct 2013 21:40:21 -0700 (PDT) Received: by 10.205.19.10 with HTTP; Thu, 10 Oct 2013 21:40:21 -0700 (PDT) Date: Fri, 11 Oct 2013 12:40:21 +0800 Message-ID: Subject: [PATCH] mtg: docg3: use free_bch() instead of kfree() From: Wei Yongjun To: dwmw2@infradead.org, artem.bityutskiy@linux.intel.com, jg1.han@samsung.com, dan.carpenter@oracle.com, robert.jarzmik@free.fr X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20131011_004045_626683_2D98EF0F X-CRM114-Status: UNSURE ( 8.08 ) X-CRM114-Notice: Please train this message. X-Spam-Score: -2.0 (--) X-Spam-Report: SpamAssassin version 3.3.2 on merlin.infradead.org summary: Content analysis details: (-2.0 points) pts rule name description ---- ---------------------- -------------------------------------------------- 0.0 FREEMAIL_FROM Sender email is commonly abused enduser mail provider (weiyj.lk[at]gmail.com) -0.0 SPF_PASS SPF: sender matches SPF record -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1% [score: 0.0000] -0.1 DKIM_VALID_AU Message has a valid DKIM or DK signature from author's domain 0.1 DKIM_SIGNED Message has a DKIM or DK signature, not necessarily valid -0.1 DKIM_VALID Message has at least one valid DKIM or DK signature Cc: yongjun_wei@trendmicro.com.cn, linux-mtd@lists.infradead.org, linux-kernel@vger.kernel.org X-BeenThere: linux-mtd@lists.infradead.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: Linux MTD discussion mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-mtd" Errors-To: linux-mtd-bounces+incoming=patchwork.ozlabs.org@lists.infradead.org From: Wei Yongjun Use free_bch() instead of kfree() to free init_bch() allocated data. Signed-off-by: Wei Yongjun Acked-by: Robert Jarzmik --- drivers/mtd/devices/docg3.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/mtd/devices/docg3.c b/drivers/mtd/devices/docg3.c index 3e1b0a0..4f091c1 100644 --- a/drivers/mtd/devices/docg3.c +++ b/drivers/mtd/devices/docg3.c @@ -2097,7 +2097,7 @@ notfound: ret = -ENODEV; dev_info(dev, "No supported DiskOnChip found\n"); err_probe: - kfree(cascade->bch); + free_bch(cascade->bch); for (floor = 0; floor < DOC_MAX_NBFLOORS; floor++) if (cascade->floors[floor]) doc_release_device(cascade->floors[floor]);