]> git.karo-electronics.de Git - karo-tx-linux.git/commit
remoteproc: fix a potential NULL-dereference on cleanup
authorDan Carpenter <dan.carpenter@oracle.com>
Tue, 25 Sep 2012 07:01:56 +0000 (10:01 +0300)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sun, 7 Oct 2012 15:35:56 +0000 (08:35 -0700)
commita4edc1f646c0cf3b8835d37ce68d8c0b2da42d7c
treeb71e4c8dd795c6490d580f82eadefb2c69d84061
parentdf34ee9a8a0355d9d2ff59fd62b2d95983619047
remoteproc: fix a potential NULL-dereference on cleanup

commit 7168d914a782086e217214c57ddfc7cc4b738c0c upstream.

We only need to allocate mapping if there is an IOMMU domain.

Otherwise, when the mappings are released, the assumption that
an IOMMU domain is there will crash and burn.

Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
[ohad: revise commit log]
Signed-off-by: Ohad Ben-Cohen <ohad@wizery.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/remoteproc/remoteproc_core.c