Thread (11 messages) 11 messages, 2 authors, 2021-06-13

Re: [PATCH -next 9/9] ASoC: fsl_xcvr: check return value after calling platform_get_resource_byname()

flat view

From: Timur Tabi <timur@kernel.org>
Date: 2021-06-13 14:01:28
Also in: alsa-devel, lkml

On Fri, Jun 11, 2021 at 4:32 AM Yang Yingliang [off-list ref] wrote:
quoted hunk ↗ jump to hunk
        rx_res = platform_get_resource_byname(pdev, IORESOURCE_MEM, "rxfifo");
        tx_res = platform_get_resource_byname(pdev, IORESOURCE_MEM, "txfifo");
+       if (!rx_res || !tx_res) {
+               dev_err(dev, "Invalid resource\n");
+               return -EINVAL;
+       }
If platform_get_resource_byname() returns an error, it's probably
because the name cannot be found.  So I think this error message is
more accurate:

"could not find rxfifo or txfifo resource"
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help