staging: fsl-mc: Fix crash in fsl_mc_device_remove()
authorJ. German Rivera <German.Rivera@freescale.com>
Fri, 27 Mar 2015 21:01:07 +0000 (16:01 -0500)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 3 Apr 2015 11:55:03 +0000 (13:55 +0200)
commit2bdc55d94fef59296f9f1aeda2a503d4c64cad86
treed1aa153da79e6820cd90f4c50a7abc0a153d3895
parent1663e80982eef51892576cb2e3d4978af787ca4d
staging: fsl-mc: Fix crash in fsl_mc_device_remove()

Only call fsl_mc_io_destroy() if the DPRC being removed
actually had an mc_io object associated with. Child DPRCs
that have not been bound to the DPRC driver or the VFIO driver
will not have an mc_io associated with them.

Signed-off-by: J. German Rivera <German.Rivera@freescale.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/staging/fsl-mc/bus/dprc-driver.c
drivers/staging/fsl-mc/bus/mc-bus.c