Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
fork

Configure Feed

Select the types of activity you want to include in your feed.

dmaengine: fsl-edma: fix wrong pointer check in fsl_edma3_attach_pd()

device_link_add() returns NULL pointer not PTR_ERR() when it fails,
so replace the IS_ERR() check with NULL pointer check.

Fixes: 72f5801a4e2b ("dmaengine: fsl-edma: integrate v3 support")
Signed-off-by: Yang Yingliang <yangyingliang@huawei.com>
Link: https://lore.kernel.org/r/20231129090000.841440-1-yangyingliang@huaweicloud.com
Signed-off-by: Vinod Koul <vkoul@kernel.org>

authored by

Yang Yingliang and committed by
Vinod Koul
bffa7218 0c154698

+2 -3
+2 -3
drivers/dma/fsl-edma-main.c
··· 396 396 link = device_link_add(dev, pd_chan, DL_FLAG_STATELESS | 397 397 DL_FLAG_PM_RUNTIME | 398 398 DL_FLAG_RPM_ACTIVE); 399 - if (IS_ERR(link)) { 400 - dev_err(dev, "Failed to add device_link to %d: %ld\n", i, 401 - PTR_ERR(link)); 399 + if (!link) { 400 + dev_err(dev, "Failed to add device_link to %d\n", i); 402 401 return -EINVAL; 403 402 } 404 403