bus/fsl_mc: Do not rely on caller to provide non NULL mc_io
authorDiana Craciun <diana.craciun@oss.nxp.com>
Tue, 29 Sep 2020 08:54:38 +0000 (11:54 +0300)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 2 Oct 2020 14:05:01 +0000 (16:05 +0200)
commit5026cf605143e764e1785bbf9158559d17f8d260
tree573c59382031024a249a10e6713c3708b62ef593
parent17eaf21320da965c2571a5f029a2becaffe8313f
bus/fsl_mc: Do not rely on caller to provide non NULL mc_io

Before destroying the mc_io, check first that it was
allocated.

Reviewed-by: Laurentiu Tudor <laurentiu.tudor@nxp.com>
Acked-by: Laurentiu Tudor <laurentiu.tudor@nxp.com>
Signed-off-by: Diana Craciun <diana.craciun@oss.nxp.com>
Link: https://lore.kernel.org/r/20200929085441.17448-11-diana.craciun@oss.nxp.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/bus/fsl-mc/mc-io.c