public inbox for kernel-janitors@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH] fpga: dfl: fme: error pointer vs NULL bug
@ 2018-08-02  8:29 Dan Carpenter
  2018-08-02  8:40 ` Wu Hao
  0 siblings, 1 reply; 2+ messages in thread
From: Dan Carpenter @ 2018-08-02  8:29 UTC (permalink / raw)
  To: Wu Hao, Kang Luwei; +Cc: Alan Tull, Moritz Fischer, linux-fpga, kernel-janitors

The dfl_fme_create_region() function doesn't return NULL pointers, it
returns error pointers.

Fixes: 29de76240e86 ("fpga: dfl: fme: add partial reconfiguration sub feature support")
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>

diff --git a/drivers/fpga/dfl-fme-pr.c b/drivers/fpga/dfl-fme-pr.c
index fc9fd2d0482f..0b840531ef33 100644
--- a/drivers/fpga/dfl-fme-pr.c
+++ b/drivers/fpga/dfl-fme-pr.c
@@ -420,7 +420,7 @@ static int pr_mgmt_init(struct platform_device *pdev,
 		/* Create region for each port */
 		fme_region = dfl_fme_create_region(pdata, mgr,
 						   fme_br->br, i);
-		if (!fme_region) {
+		if (IS_ERR(fme_region)) {
 			ret = PTR_ERR(fme_region);
 			goto destroy_region;
 		}

^ permalink raw reply related	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2018-08-02  8:40 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2018-08-02  8:29 [PATCH] fpga: dfl: fme: error pointer vs NULL bug Dan Carpenter
2018-08-02  8:40 ` Wu Hao

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox