summaryrefslogtreecommitdiffstats
path: root/drivers/clk/hisilicon/reset.c
Commit message (Collapse)AuthorAgeFilesLines
* reset: hisilicon: fix potential NULL pointer dereferenceGustavo A. R. Silva2018-08-311-3/+2Star
| | | | | | | | | | | | | | | | There is a potential execution path in which function platform_get_resource() returns NULL. If this happens, we will end up having a NULL pointer dereference. Fix this by replacing devm_ioremap with devm_ioremap_resource, which has the NULL check and the memory region request. This code was detected with the help of Coccinelle. Cc: stable@vger.kernel.org Fixes: 97b7129cd2af ("reset: hisilicon: change the definition of hisi_reset_init") Signed-off-by: Gustavo A. R. Silva <gustavo@embeddedor.com> Signed-off-by: Stephen Boyd <sboyd@kernel.org>
* reset: hisilicon: change the definition of hisi_reset_initJiancheng Xue2016-06-301-10/+9Star
| | | | | | | Change the input arguments type to struct platform_device pointer. Signed-off-by: Jiancheng Xue <xuejiancheng@hisilicon.com> Signed-off-by: Stephen Boyd <sboyd@codeaurora.org>
* reset: hisilicon: add reset controller driver for hisilicon SOCsJiancheng Xue2016-05-061-0/+134
In most of hisilicon SOCs, reset controller and clock provider are combined together as a block named CRG (Clock and Reset Generator). This patch mainly implements the reset function. Signed-off-by: Jiancheng Xue <xuejiancheng@hisilicon.com> Acked-by: Philipp Zabel <p.zabel@pengutronix.de> Signed-off-by: Stephen Boyd <sboyd@codeaurora.org>