summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorWen Yang <wen.yang99@zte.com.cn>2019-01-03 01:09:53 +0800
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2019-02-27 10:09:44 +0100
commit0962699ef1b00db360529776c9258ef22749e3bb (patch)
treefe059aa7d45276812da7fa869ed32c7ee0a84357 /include
parent01cc87321d8638a37e703b84b5f3b6751b39f826 (diff)
soc/fsl/qe: fix err handling of ucc_of_parse_tdm
[ Upstream commit 8d68100ab4ad92560a16a68b72e068613ac4d573 ] 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: Li Yang <leoyang.li@nxp.com> Suggested-by: Christophe LEROY <christophe.leroy@c-s.fr> Signed-off-by: Wen Yang <wen.yang99@zte.com.cn> Reviewed-by: Peng 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: David S. Miller <davem@davemloft.net> Signed-off-by: Sasha Levin <sashal@kernel.org>
Diffstat (limited to 'include')
0 files changed, 0 insertions, 0 deletions