NTB: ntb_hw_idt: replace IS_ERR_OR_NULL with regular NULL checks
mainline inclusion from mainline-4.20-rc1 commit 1b761982 category: bugfix bugzilla: 6513 CVE: NA ------------------------------------------------- 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: bf2a952d ("NTB: Add IDT 89HPESxNTx PCIe-switches support") Signed-off-by: NGustavo A. R. Silva <gustavo@embeddedor.com> Signed-off-by: NJon Mason <jdmason@kudzu.us> Signed-off-by: NZhang Dianfang <zhangdianfang@huawei.com> Reviewed-by: NHanjun Guo <guohanjun@huawei.com> Signed-off-by: NYang Yingliang <yangyingliang@huawei.com>
Showing
想要评论请 注册 或 登录