提交 075c7c04 编写于 作者: Y Yang Yingliang 提交者: Suzuki K Poulose

coresight: ultrasoc-smb: fix return value check in smb_init_data_buffer()

platform_get_resource() returns NULL pointer not PTR_ERR(), replace
the IS_ERR() check with NULL pointer check.
Signed-off-by: NYang Yingliang <yangyingliang@huawei.com>
Signed-off-by: NSuzuki K Poulose <suzuki.poulose@arm.com>
Link: https://lore.kernel.org/r/20230118074920.1772141-1-yangyingliang@huawei.com
上级 2d4103ae
......@@ -455,7 +455,7 @@ static int smb_init_data_buffer(struct platform_device *pdev,
void *base;
res = platform_get_resource(pdev, IORESOURCE_MEM, SMB_BUF_ADDR_RES);
if (IS_ERR(res)) {
if (!res) {
dev_err(&pdev->dev, "SMB device failed to get resource\n");
return -EINVAL;
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册