Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1503716 > unrolled thread

Re: [PATCH] dmaengine: st_fdma: fix uninitialized variable access

Started byPeter Griffin <peter.griffin@linaro.org>
First post2016-10-19 16:40 +0200
Last post2016-10-19 16:40 +0200
Articles 1 — 1 participant

Back to article view | Back to linux.kernel

This discussion starts older than the indexed window; earlier articles aren't shown. The article labeled Started by below is the oldest one visible, not the original post.


Contents

  Re: [PATCH] dmaengine: st_fdma: fix uninitialized variable access Peter Griffin <peter.griffin@linaro.org> - 2016-10-19 16:40 +0200

#1503716 — Re: [PATCH] dmaengine: st_fdma: fix uninitialized variable access

FromPeter Griffin <peter.griffin@linaro.org>
Date2016-10-19 16:40 +0200
SubjectRe: [PATCH] dmaengine: st_fdma: fix uninitialized variable access
Message-ID<su0ca-2v4-63@gated-at.bofh.it>
Hi Arnd,

On Wed, 19 Oct 2016, Arnd Bergmann wrote:

> The newly added st_fdma driver introduces a build warning for
> allmodconfig when we add '-Wmaybe-uninitialized':
> 
> drivers/dma/st_fdma.c: In function 'st_fdma_probe':
> drivers/dma/st_fdma.c:777:5: error: 'ret' may be used uninitialized in this function [-Werror=maybe-uninitialized]
> 
> The warning is correct, though this can't happen in practice
> as the check is redundant (we don't get to this function if
> the pointer is NULL). Even if the function were called with a
> NULL of_node, the check is not needed because of_property_read_u32
> can deal with a NULL argument by returning an error.
> 
> Removing the unnecessary code simplifies the function and avoids
> the condition that we get the warning for.
> 
> Fixes: 6b4cd727eaf1 ("dmaengine: st_fdma: Add STMicroelectronics FDMA engine driver support")
> Signed-off-by: Arnd Bergmann <arnd@arndb.de>
> ---

Acked-by: Peter Griffin <peter.griffin@linaro.org>

regards,

Peter.

[toc] | [standalone]


Back to top | Article view | linux.kernel


csiph-web