• Wen Yang's avatar
    soc/fsl/qe: fix err handling of ucc_of_parse_tdm · 0962699e
    Wen Yang authored
    [ Upstream commit 8d68100a ]
    
    Currently there are some issues with the ucc_of_parse_tdm function:
    1, a possible null pointer dereference in ucc_of_parse_tdm,
    detected by the semantic patch deref_null.cocci,
    with the following warning:
    drivers/soc/fsl/qe/qe_tdm.c:177:21-24: ERROR: pdev is NULL but dereferenced.
    2, dev gets modified, so in any case that devm_iounmap() will fail
    even when the new pdev is valid, because the iomap was done with a
     different pdev.
    3, there is no driver bind with the "fsl,t1040-qe-si" or
    "fsl,t1040-qe-siram" device. So allocating resources using devm_*()
    with these devices won't provide a cleanup path for these resources
    when the caller fails.
    
    This patch fixes them.
    Suggested-by: default avatarLi Yang <leoyang.li@nxp.com>
    Suggested-by: default avatarChristophe LEROY <christophe.leroy@c-s.fr>
    Signed-off-by: default avatarWen Yang <wen.yang99@zte.com.cn>
    Reviewed-by: default avatarPeng Hao <peng.hao2@zte.com.cn>
    CC: Julia Lawall <julia.lawall@lip6.fr>
    CC: Zhao Qiang <qiang.zhao@nxp.com>
    CC: David S. Miller <davem@davemloft.net>
    CC: netdev@vger.kernel.org
    CC: linuxppc-dev@lists.ozlabs.org
    CC: linux-kernel@vger.kernel.org
    Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
    Signed-off-by: default avatarSasha Levin <sashal@kernel.org>
    0962699e
Name
Last commit
Last update
..
lmc Loading commit data...
.gitignore Loading commit data...
Kconfig Loading commit data...
Makefile Loading commit data...
c101.c Loading commit data...
cosa.c Loading commit data...
cosa.h Loading commit data...
dlci.c Loading commit data...
dscc4.c Loading commit data...
farsync.c Loading commit data...
farsync.h Loading commit data...
fsl_ucc_hdlc.c Loading commit data...
fsl_ucc_hdlc.h Loading commit data...
hd64570.c Loading commit data...
hd64570.h Loading commit data...
hd64572.c Loading commit data...
hd64572.h Loading commit data...
hdlc.c Loading commit data...
hdlc_cisco.c Loading commit data...
hdlc_fr.c Loading commit data...
hdlc_ppp.c Loading commit data...
hdlc_raw.c Loading commit data...
hdlc_raw_eth.c Loading commit data...
hdlc_x25.c Loading commit data...
hostess_sv11.c Loading commit data...
ixp4xx_hss.c Loading commit data...
lapbether.c Loading commit data...
n2.c Loading commit data...
pc300too.c Loading commit data...
pci200syn.c Loading commit data...
sbni.c Loading commit data...
sbni.h Loading commit data...
sdla.c Loading commit data...
sealevel.c Loading commit data...
slic_ds26522.c Loading commit data...
slic_ds26522.h Loading commit data...
wanxl.c Loading commit data...
wanxl.h Loading commit data...
wanxlfw.S Loading commit data...
wanxlfw.inc_shipped Loading commit data...
x25_asy.c Loading commit data...
x25_asy.h Loading commit data...
z85230.c Loading commit data...
z85230.h Loading commit data...