Commit 5026cf60 authored by Diana Craciun's avatar Diana Craciun Committed by Greg Kroah-Hartman
Browse files

bus/fsl_mc: Do not rely on caller to provide non NULL mc_io

parent 17eaf213
Loading
Loading
Loading
Loading
+6 −1
Original line number Diff line number Diff line
@@ -129,7 +129,12 @@ error_destroy_mc_io:
 */
void fsl_destroy_mc_io(struct fsl_mc_io *mc_io)
{
	struct fsl_mc_device *dpmcp_dev = mc_io->dpmcp_dev;
	struct fsl_mc_device *dpmcp_dev;

	if (!mc_io)
		return;

	dpmcp_dev = mc_io->dpmcp_dev;

	if (dpmcp_dev)
		fsl_mc_io_unset_dpmcp(mc_io);