From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751228AbdLIHYc (ORCPT ); Sat, 9 Dec 2017 02:24:32 -0500 Received: from smtp02.smtpout.orange.fr ([80.12.242.124]:47891 "EHLO smtp.smtpout.orange.fr" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751087AbdLIHYa (ORCPT ); Sat, 9 Dec 2017 02:24:30 -0500 X-ME-Helo: localhost.localdomain X-ME-Auth: Y2hyaXN0b3BoZS5qYWlsbGV0QHdhbmFkb28uZnI= X-ME-Date: Sat, 09 Dec 2017 08:24:28 +0100 X-ME-IP: 86.236.211.195 From: Christophe JAILLET To: kyungmin.park@samsung.com, dwmw2@infradead.org, computersforpeace@gmail.com, boris.brezillon@free-electrons.com, marek.vasut@gmail.com, richard@nod.at, cyrille.pitchen@wedev4u.fr Cc: linux-mtd@lists.infradead.org, linux-kernel@vger.kernel.org, kernel-janitors@vger.kernel.org, Christophe JAILLET Subject: [PATCH 0/2 v2] mtd: onenand: samsung: Simplify code and fix leaks in error handling paths Date: Sat, 9 Dec 2017 08:24:03 +0100 Message-Id: X-Mailer: git-send-email 2.14.1 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org The first patch converts 's3c_onenand_probe()' to devm_ functions. This fixes a leak in one path (line 872). This also free_irq which was not handled at all. (I hope I'm correct :) ) The 2nd patch is about an un-handled error code which looks spurious. Not sure if I'm right. While compile-testing it, I had to tweak the code because I don't have any cross-compiler. I commented the line "#include " and the compilation succeeded. So maybe, this include is also useless. I've left it as-is, though. Theses patches have been compile-tested-only. Christophe JAILLET (2): mtd: onenand: samsung: use devm_ function to simplify code and fix some leaks mtd: onenand: samsung: return an error if 'mtd_device_parse_register()' fails drivers/mtd/onenand/samsung.c | 169 +++++++++--------------------------------- 1 file changed, 34 insertions(+), 135 deletions(-) -- 2.14.1