From: Greg KH <gregkh@linuxfoundation.org>
To: Jiasheng Jiang <jiasheng@iscas.ac.cn>
Cc: linux-kernel@vger.kernel.org
Subject: Re: [PATCH RESEND] uio: uio_dmem_genirq: Catch the Exception
Date: Fri, 3 Dec 2021 15:17:52 +0100 [thread overview]
Message-ID: <YaonED6U7CWERHnr@kroah.com> (raw)
In-Reply-To: <20211202091839.1489204-1-jiasheng@iscas.ac.cn>
On Thu, Dec 02, 2021 at 05:18:39PM +0800, Jiasheng Jiang wrote:
> The return value of dma_set_coherent_mask() is not always 0.
> To catch the exception in case that dma is not support the mask.
>
> Fixes: 0a0c3b5a24bd ("Add new uio device for dynamic memory allocation")
> Signed-off-by: Jiasheng Jiang <jiasheng@iscas.ac.cn>
> ---
> drivers/uio/uio_dmem_genirq.c | 4 +++-
> 1 file changed, 3 insertions(+), 1 deletion(-)
>
> diff --git a/drivers/uio/uio_dmem_genirq.c b/drivers/uio/uio_dmem_genirq.c
> index 6b5cfa5b0673..570f5be64b46 100644
> --- a/drivers/uio/uio_dmem_genirq.c
> +++ b/drivers/uio/uio_dmem_genirq.c
> @@ -188,7 +188,9 @@ static int uio_dmem_genirq_probe(struct platform_device *pdev)
> return -ENOMEM;
> }
>
> - dma_set_coherent_mask(&pdev->dev, DMA_BIT_MASK(32));
> + ret = dma_set_coherent_mask(&pdev->dev, DMA_BIT_MASK(32));
> + if (ret)
> + return ret;
Please print out an error like the other failures above this in the
function.
And why is this a RESEND? When was it sent before?
thanks,
greg k-h
prev parent reply other threads:[~2021-12-03 14:17 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-12-02 9:18 [PATCH RESEND] uio: uio_dmem_genirq: Catch the Exception Jiasheng Jiang
2021-12-03 14:17 ` Greg KH [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=YaonED6U7CWERHnr@kroah.com \
--to=gregkh@linuxfoundation.org \
--cc=jiasheng@iscas.ac.cn \
--cc=linux-kernel@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox