thermal: imx: fix a possible NULL dereference