From: Pierre Yves MORDRET <pierre-yves.mordret@st.com>
To: Aditya Pakki <pakki001@umn.edu>
Cc: Alexandre Torgue <alexandre.torgue@st.com>, <kjlu@umn.edu>,
<linux-kernel@vger.kernel.org>, Vinod Koul <vkoul@kernel.org>,
Maxime Coquelin <mcoquelin.stm32@gmail.com>,
<dmaengine@vger.kernel.org>,
Dan Williams <dan.j.williams@intel.com>,
<linux-stm32@st-md-mailman.stormreply.com>,
<linux-arm-kernel@lists.infradead.org>
Subject: Re: [PATCH] dmaengine: stm32-mdma: Add a check on read_u32_array
Date: Fri, 4 Jan 2019 09:05:55 +0100 [thread overview]
Message-ID: <8412ac64-cd6d-7390-87a1-24f5e7cdf87a@st.com> (raw)
In-Reply-To: <20181228192641.9713-1-pakki001@umn.edu>
Hello
Acked-by: Pierre-Yves MORDRET <pierre-yves.mordret@st.com>
Regards
On 12/28/18 8:26 PM, Aditya Pakki wrote:
> In stm32_mdma_probe, after reading the property "st,ahb-addr-masks", the
> second call is not checked for failure. This time of check to time of use
> case of "count" error is sent upstream.
>
> Signed-off-by: Aditya Pakki <pakki001@umn.edu>
> ---
> drivers/dma/stm32-mdma.c | 4 +++-
> 1 file changed, 3 insertions(+), 1 deletion(-)
>
> diff --git a/drivers/dma/stm32-mdma.c b/drivers/dma/stm32-mdma.c
> index 390e4cae0e1a..485dea177704 100644
> --- a/drivers/dma/stm32-mdma.c
> +++ b/drivers/dma/stm32-mdma.c
> @@ -1579,9 +1579,11 @@ static int stm32_mdma_probe(struct platform_device *pdev)
>
> dmadev->nr_channels = nr_channels;
> dmadev->nr_requests = nr_requests;
> - device_property_read_u32_array(&pdev->dev, "st,ahb-addr-masks",
> + ret = device_property_read_u32_array(&pdev->dev, "st,ahb-addr-masks",
> dmadev->ahb_addr_masks,
> count);
> + if (ret)
> + return ret;
> dmadev->nr_ahb_addr_masks = count;
>
> res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
>
next prev parent reply other threads:[~2019-01-04 8:07 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-12-28 19:26 [PATCH] dmaengine: stm32-mdma: Add a check on read_u32_array Aditya Pakki
2019-01-04 8:05 ` Pierre Yves MORDRET [this message]
2019-01-04 14:33 ` Vinod Koul
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=8412ac64-cd6d-7390-87a1-24f5e7cdf87a@st.com \
--to=pierre-yves.mordret@st.com \
--cc=alexandre.torgue@st.com \
--cc=dan.j.williams@intel.com \
--cc=dmaengine@vger.kernel.org \
--cc=kjlu@umn.edu \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-stm32@st-md-mailman.stormreply.com \
--cc=mcoquelin.stm32@gmail.com \
--cc=pakki001@umn.edu \
--cc=vkoul@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;
as well as URLs for NNTP newsgroup(s).