]> asedeno.scripts.mit.edu Git - linux.git/commit
mtd: onenand: samsung: use devm_ function to simplify code and fix some leaks
authorChristophe JAILLET <christophe.jaillet@wanadoo.fr>
Thu, 14 Dec 2017 06:03:49 +0000 (07:03 +0100)
committerBoris Brezillon <boris.brezillon@free-electrons.com>
Mon, 18 Dec 2017 16:37:39 +0000 (17:37 +0100)
commit8b5c51a45c39c6d4f05c6f87d05f54b6c28f7c36
tree6efc5f07c41a68a1708eb1c2824b9716ae91315c
parent8878b126df769831cb2fa4088c3806538e8305f5
mtd: onenand: samsung: use devm_ function to simplify code and fix some leaks

Convert all error handling code in 's3c_onenand_probe()' to
resource-managed alternatives in order to simplify code.

This fixes a resource leak if 'platform_get_resource()' fails at line 872.

The 'request_irq()' at line 971 was also un-balanced. It is now
resource-managed.

Signed-off-by: Christophe JAILLET <christophe.jaillet@wanadoo.fr>
Signed-off-by: Boris Brezillon <boris.brezillon@free-electrons.com>
drivers/mtd/onenand/samsung.c