Skip to content

mtd: onenand: samsung: Simplify code and fix leaks in error handling paths

Christophe JAILLET kernel-janitors linux-mtd lkml 3 versions – In review

Get series with b4
b4 am [email protected]

Versions newest first · linked by author and title

  1. v3 Latest4 patches 3 repliesIn review
  2. v22 patches 2 repliesSuperseded
  3. v12 patches 3 repliesSuperseded

Patches in v3 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/4mtd: onenand: samsung: use devm_ function to simplify code and fix some leaksdrivers/mtd/onenand/samsung.c+29 -1351 reply
2/4mtd: onenand: samsung: return an error if 'mtd_device_parse_register()' failsdrivers/mtd/onenand/samsung.c+5 -00 replies
3/4mtd: onenand: samsung: Propagate the error returned by 'onenand_scan()'drivers/mtd/onenand/samsung.c+3 -20 replies
3/4mtd: onenand: samsung: Remove a useless includedrivers/mtd/onenand/samsung.c+0 -21 reply

Reviews trailers per patch

No Reviewed-by, Acked-by or Tested-by trailers for v3 yet.

Read the v3 thread

Cover letter [PATCH 0/4 v3] mtd: onenand: samsung: Simplify code and fix leaks in error handling paths

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.

The 3rd patch propagates an error code instead of returning a hard-coded value.

The last one removes a useless include spotted while compile-testing.

v3: patch 1/4 updated to fix a bug introduced in v2
patch 2/4 unchanged
patch 3/4 and 4/4 added
now the patch are cross-compile tested :)

Theses patches have been cross compile-tested-only.

Christophe JAILLET (4):
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
mtd: onenand: samsung: Propagate the error returned

    by 'onenand_scan()'

mtd: onenand: samsung: Remove a useless include

 drivers/mtd/onenand/samsung.c | 172 +++++++++---------------------------------
 1 file changed, 35 insertions(+), 137 deletions(-)
Signature · 1 line
2.14.1