]> git.kernelconcepts.de Git - karo-tx-linux.git/commit
mfd: vexpress: fix error handling vexpress_syscfg_regmap_init()
authorDan Carpenter <dan.carpenter@oracle.com>
Wed, 11 Jun 2014 10:17:41 +0000 (13:17 +0300)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 10 Jul 2014 00:00:45 +0000 (17:00 -0700)
commitb86e1926be37c77deeb176466d98678feab04066
tree45ef90e6c898522221deaa382034ef21a1f98183
parent8a26af30ff55bec82443e718e26efd6b3a8bba83
mfd: vexpress: fix error handling vexpress_syscfg_regmap_init()

This function should be returning an ERR_PTR() on failure instead of
NULL.  Also there is a use after free bug if regmap_init() fails because
we free "func" and then dereference doing the return.

Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Acked-by: Pawel Moll <pawel.moll@arm.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/misc/vexpress-syscfg.c