Skip to content

Commit 029d727

Browse files
Wei Yongjungregkh
authored andcommitted
fpga: dfl: fme: fix return value check in in pr_mgmt_init()
In case of error, the function dfl_fme_create_region() returns ERR_PTR() and never returns NULL. The NULL test in the return value check should be replaced with IS_ERR(). Fixes: 29de762 ("fpga: dfl: fme: add partial reconfiguration sub feature support") Signed-off-by: Wei Yongjun <[email protected]> Acked-by: Moritz Fischer <[email protected]> Acked-by: Alan Tull <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
1 parent de91673 commit 029d727

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

drivers/fpga/dfl-fme-pr.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -420,7 +420,7 @@ static int pr_mgmt_init(struct platform_device *pdev,
420420
/* Create region for each port */
421421
fme_region = dfl_fme_create_region(pdata, mgr,
422422
fme_br->br, i);
423-
if (!fme_region) {
423+
if (IS_ERR(fme_region)) {
424424
ret = PTR_ERR(fme_region);
425425
goto destroy_region;
426426
}

0 commit comments

Comments
 (0)