From: "Gustavo A. R. Silva" <garsilva@embeddedor.com>
To: Alan Tull <atull@kernel.org>, Moritz Fischer <mdf@kernel.org>
Cc: linux-fpga@vger.kernel.org, linux-kernel@vger.kernel.org,
"Gustavo A. R. Silva" <garsilva@embeddedor.com>
Subject: [PATCH] fpga: fpga-bridge: remove unnecessary null check in of_fpga_bridge_get
Date: Fri, 27 Oct 2017 15:19:51 -0500 [thread overview]
Message-ID: <20171027201951.GA27077@embeddedor.com> (raw)
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@kernel.org>
Signed-off-by: Gustavo A. R. Silva <garsilva@embeddedor.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
next reply other threads:[~2017-10-27 20:19 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-10-27 20:19 Gustavo A. R. Silva [this message]
2017-10-28 17:15 ` Moritz Fischer
2017-10-29 0:25 ` Gustavo A. R. Silva
2017-10-30 20:34 ` Alan Tull
2017-10-30 22:20 ` Gustavo A. R. Silva
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20171027201951.GA27077@embeddedor.com \
--to=garsilva@embeddedor.com \
--cc=atull@kernel.org \
--cc=linux-fpga@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=mdf@kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
Powered by JetHome