[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <1510785192-10123-3-git-send-email-atull@kernel.org>
Date: Wed, 15 Nov 2017 16:33:11 -0600
From: Alan Tull <atull@...nel.org>
To: Greg Kroah-Hartman <gregkh@...uxfoundation.org>
Cc: Moritz Fischer <mdf@...nel.org>, Alan Tull <atull@...nel.org>,
linux-kernel@...r.kernel.org, linux-fpga@...r.kernel.org,
"Gustavo A. R. Silva" <garsilva@...eddedor.com>
Subject: [PATCH 2/3] fpga: fpga-bridge: remove unnecessary null check in of_fpga_bridge_get
From: "Gustavo A. R. Silva" <garsilva@...eddedor.com>
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>
Reviewed-by: Moritz Fischer <mdf@...nel.org>
Signed-off-by: Alan Tull <atull@...nel.org>
---
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 4c48dd6..038b10b 100644
--- a/drivers/fpga/fpga-bridge.c
+++ b/drivers/fpga/fpga-bridge.c
@@ -78,8 +78,6 @@ static struct fpga_bridge *__fpga_bridge_get(struct device *dev,
int ret = -ENODEV;
bridge = to_fpga_bridge(dev);
- if (!bridge)
- goto err_dev;
bridge->info = info;
--
2.7.4
Powered by blists - more mailing lists