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


Groups > linux.kernel > #1503710

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

From Vinod Koul <vinod.koul@intel.com>
Newsgroups linux.kernel
Subject Re: [PATCH] dmaengine: st_fdma: fix uninitialized variable access
Date 2016-10-19 16:40 +0200
Message-ID <su0ca-2v4-41@gated-at.bofh.it> (permalink)
References <su0ca-2v4-43@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


On Wed, Oct 19, 2016 at 02:09:10PM +0200, 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.

Applied, thanks

-- 
~Vinod

Back to linux.kernel | Previous | Next | Find similar | Unroll thread


Thread

Re: [PATCH] dmaengine: st_fdma: fix uninitialized variable access Vinod Koul <vinod.koul@intel.com> - 2016-10-19 16:40 +0200

csiph-web