]> git.baikalelectronics.ru Git - kernel.git/commit
fpga: dfl: fme: fix return value check in in pr_mgmt_init()
authorWei Yongjun <weiyongjun1@huawei.com>
Thu, 16 Aug 2018 19:42:13 +0000 (14:42 -0500)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 12 Sep 2018 07:31:00 +0000 (09:31 +0200)
commit3479de4fec949a63fa5c3f71b0f15de92ace2035
tree9c84e65bb3b7b92a73b09e70b01034653e0fb5a3
parent931b784ba95bddc522d3ee95c2c45ca18ab5024b
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: 6a51c1251f4e ("fpga: dfl: fme: add partial reconfiguration sub feature support")
Signed-off-by: Wei Yongjun <weiyongjun1@huawei.com>
Acked-by: Moritz Fischer <mdf@kernel.org>
Acked-by: Alan Tull <atull@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/fpga/dfl-fme-pr.c