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)
committerJon Mason <jdmason@kudzu.us>
Wed, 31 Oct 2018 20:22:44 +0000 (16:22 -0400)
commit1b7619828d0c341612f58683e73f279c37e70bbc
tree2e417cdfc1ce30c4d72a58fee4953199878e2386
parent7756e2b5d68c36e170a111dceea22f7365f83256
NTB: ntb_hw_idt: replace IS_ERR_OR_NULL with regular NULL checks

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>
drivers/ntb/hw/idt/ntb_hw_idt.c