linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 0/2 v2] mtd: onenand: samsung: Simplify code and fix leaks in error handling paths
@ 2017-12-09  7:24 Christophe JAILLET
  2017-12-09  7:24 ` [PATCH 1/2 v2] mtd: onenand: samsung: use devm_ function to simplify code and fix some leaks Christophe JAILLET
                   ` (2 more replies)
  0 siblings, 3 replies; 5+ messages in thread
From: Christophe JAILLET @ 2017-12-09  7:24 UTC (permalink / raw)
  To: kyungmin.park, dwmw2, computersforpeace, boris.brezillon,
	marek.vasut, richard, cyrille.pitchen
  Cc: linux-mtd, linux-kernel, kernel-janitors, Christophe JAILLET

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 <asm/mach/flash.h>" 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

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2017-12-09  8:33 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-12-09  7:24 [PATCH 0/2 v2] mtd: onenand: samsung: Simplify code and fix leaks in error handling paths Christophe JAILLET
2017-12-09  7:24 ` [PATCH 1/2 v2] mtd: onenand: samsung: use devm_ function to simplify code and fix some leaks Christophe JAILLET
2017-12-09  8:33   ` Boris Brezillon
2017-12-09  7:24 ` [PATCH 2/2 v2] mtd: onenand: samsung: return an error if 'mtd_device_parse_register()' fails Christophe JAILLET
2017-12-09  8:27 ` [PATCH 0/2 v2] mtd: onenand: samsung: Simplify code and fix leaks in error handling paths Boris Brezillon

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).