Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 6958cd44 authored by J. German Rivera's avatar J. German Rivera Committed by Greg Kroah-Hartman
Browse files

staging: fsl-mc: Fixed bug in fsl_mc_allocator_remove



Call fsl_mc_resource_pool_remove_device() only if mc_dev->resource
is not NULL.

Signed-off-by: default avatarJ. German Rivera <German.Rivera@freescale.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent 95e9a09a
Loading
Loading
Loading
Loading
+5 −3
Original line number Diff line number Diff line
@@ -511,9 +511,11 @@ static int fsl_mc_allocator_remove(struct fsl_mc_device *mc_dev)
	if (WARN_ON(!FSL_MC_IS_ALLOCATABLE(mc_dev->obj_desc.type)))
		goto out;

	if (mc_dev->resource) {
		error = fsl_mc_resource_pool_remove_device(mc_dev);
		if (error < 0)
			goto out;
	}

	dev_dbg(&mc_dev->dev,
		"Allocatable MC object device unbound from fsl_mc_allocator driver");