diff mbox series

clk: imx: remove redundant assignment to pointer np

Message ID 20201029224007.390762-1-colin.king@canonical.com (mailing list archive)
State Awaiting Upstream, archived
Headers show
Series clk: imx: remove redundant assignment to pointer np | expand

Commit Message

Colin King Oct. 29, 2020, 10:40 p.m. UTC
From: Colin Ian King <colin.king@canonical.com>

Pointer np is being initialized with a value that is never read
and it is being updated with a value later on. The initialization
is redundant and can be removed.

Addresses-Coverity: ("Unused value")
Signed-off-by: Colin Ian King <colin.king@canonical.com>
---
 drivers/clk/imx/clk-imx8mp.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Aisheng Dong Oct. 30, 2020, 3:27 a.m. UTC | #1
> From: Colin King <colin.king@canonical.com>
> Sent: Friday, October 30, 2020 6:40 AM
> 
> Pointer np is being initialized with a value that is never read and it is being
> updated with a value later on. The initialization is redundant and can be
> removed.
> 
> Addresses-Coverity: ("Unused value")
> Signed-off-by: Colin Ian King <colin.king@canonical.com>

Reviewed-by: Dong Aisheng <aisheng.dong@nxp.com>

Regards
Aisheng
Shawn Guo Nov. 1, 2020, 9:27 a.m. UTC | #2
On Thu, Oct 29, 2020 at 10:40:07PM +0000, Colin King wrote:
> From: Colin Ian King <colin.king@canonical.com>
> 
> Pointer np is being initialized with a value that is never read
> and it is being updated with a value later on. The initialization
> is redundant and can be removed.
> 
> Addresses-Coverity: ("Unused value")
> Signed-off-by: Colin Ian King <colin.king@canonical.com>

Applied, thanks.
diff mbox series

Patch

diff --git a/drivers/clk/imx/clk-imx8mp.c b/drivers/clk/imx/clk-imx8mp.c
index 12ce4770f702..3cb2bc46eae0 100644
--- a/drivers/clk/imx/clk-imx8mp.c
+++ b/drivers/clk/imx/clk-imx8mp.c
@@ -425,7 +425,7 @@  static struct clk **uart_clks[ARRAY_SIZE(uart_clk_ids) + 1];
 static int imx8mp_clocks_probe(struct platform_device *pdev)
 {
 	struct device *dev = &pdev->dev;
-	struct device_node *np = dev->of_node;
+	struct device_node *np;
 	void __iomem *anatop_base, *ccm_base;
 	int i;