]> git.proxmox.com Git - mirror_ubuntu-bionic-kernel.git/commit
NTB: ntb_hw_idt: replace IS_ERR_OR_NULL with regular NULL checks
authorGustavo A. R. Silva <gustavo@embeddedor.com>
Mon, 27 Aug 2018 22:13:06 +0000 (17:13 -0500)
committerKhalid Elmously <khalid.elmously@canonical.com>
Fri, 14 Feb 2020 05:29:37 +0000 (00:29 -0500)
commit7379c4a3ee1ee12f37038414b403ff9a4c992ca4
tree1ddd5dd87f10755f825d397db6f6b0dda74f49f1
parent55326781b921c57b221ebd778468bbf1d8d605bc
NTB: ntb_hw_idt: replace IS_ERR_OR_NULL with regular NULL checks

BugLink: https://bugs.launchpad.net/bugs/1863019
[ Upstream commit 1b7619828d0c341612f58683e73f279c37e70bbc ]

Both devm_kcalloc() and devm_kzalloc() return NULL on error. They
never return error pointers.

The use of IS_ERR_OR_NULL is currently applied to the wrong
context.

Fix this by replacing IS_ERR_OR_NULL with regular NULL checks.

Fixes: bf2a952d31d2 ("NTB: Add IDT 89HPESxNTx PCIe-switches support")
Signed-off-by: Gustavo A. R. Silva <gustavo@embeddedor.com>
Signed-off-by: Jon Mason <jdmason@kudzu.us>
Signed-off-by: Sasha Levin <sashal@kernel.org>
Signed-off-by: Kamal Mostafa <kamal@canonical.com>
Signed-off-by: Khalid Elmously <khalid.elmously@canonical.com>
drivers/ntb/hw/idt/ntb_hw_idt.c