soc: fsl: qe: Check of ioremap return value
authorJiasheng Jiang <jiasheng@iscas.ac.cn>
Thu, 30 Dec 2021 01:45:43 +0000 (09:45 +0800)
committerLi Yang <leoyang.li@nxp.com>
Fri, 7 Jan 2022 02:53:18 +0000 (20:53 -0600)
commit1ce93cb102e7fcf5d1849044d23ce92b5a71040a
tree74cf40e63a7280d32e9b40d18279a7013e802a56
parent6e55608192b466cf6f625f8fe22c0ff28eea0914
soc: fsl: qe: Check of ioremap return value

As the possible failure of the ioremap(), the par_io could be NULL.
Therefore it should be better to check it and return error in order to
guarantee the success of the initiation.
But, I also notice that all the caller like mpc85xx_qe_par_io_init() in
`arch/powerpc/platforms/85xx/common.c` don't check the return value of
the par_io_init().
Actually, par_io_init() needs to check to handle the potential error.
I will submit another patch to fix that.
Anyway, par_io_init() itsely should be fixed.

Fixes: 7aa1aa6ecec2 ("QE: Move QE from arch/powerpc to drivers/soc")
Signed-off-by: Jiasheng Jiang <jiasheng@iscas.ac.cn>
Signed-off-by: Li Yang <leoyang.li@nxp.com>
drivers/soc/fsl/qe/qe_io.c