[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-ID: <20171027201951.GA27077@embeddedor.com>
Date: Fri, 27 Oct 2017 15:19:51 -0500
From: "Gustavo A. R. Silva" <garsilva@...eddedor.com>
To: Alan Tull <atull@...nel.org>, Moritz Fischer <mdf@...nel.org>
Cc: linux-fpga@...r.kernel.org, linux-kernel@...r.kernel.org,
"Gustavo A. R. Silva" <garsilva@...eddedor.com>
Subject: [PATCH] fpga: fpga-bridge: remove unnecessary null check in
of_fpga_bridge_get
Notice that bridge = to_fpga_bridge(dev); expands to:
bridge = container_of(dev, struct fpga_bridge, dev);
and container_of is never null, so this null check is
unnecessary.
Addresses-Coverity-ID: 1397912
Reported-by: Alan Tull <atull@...nel.org>
Signed-off-by: Gustavo A. R. Silva <garsilva@...eddedor.com>
---
drivers/fpga/fpga-bridge.c | 2 --
1 file changed, 2 deletions(-)
diff --git a/drivers/fpga/fpga-bridge.c b/drivers/fpga/fpga-bridge.c
index 9651aa5..409d1ac 100644
--- a/drivers/fpga/fpga-bridge.c
+++ b/drivers/fpga/fpga-bridge.c
@@ -94,8 +94,6 @@ struct fpga_bridge *of_fpga_bridge_get(struct device_node *np,
goto err_dev;
bridge = to_fpga_bridge(dev);
- if (!bridge)
- goto err_dev;
bridge->info = info;
--
2.7.4
Powered by blists - more mailing lists