[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <20190705174727.30c616aa@karo-electronics.de>
Date: Fri, 5 Jul 2019 17:47:27 +0200
From: Lothar Waßmann <LW@...O-electronics.de>
To: Sven Van Asbroeck <thesven73@...il.com>
Cc: Vinod Koul <vkoul@...nel.org>, Shawn Guo <shawnguo@...nel.org>,
Sascha Hauer <s.hauer@...gutronix.de>,
Linux Kernel Mailing List <linux-kernel@...r.kernel.org>,
NXP Linux Team <linux-imx@....com>,
Pengutronix Kernel Team <kernel@...gutronix.de>,
dmaengine@...r.kernel.org, Dan Williams <dan.j.williams@...el.com>,
Robin Gong <yibin.gong@....com>,
Fabio Estevam <festevam@...il.com>,
"moderated list:ARM/FREESCALE IMX / MXC ARM ARCHITECTURE"
<linux-arm-kernel@...ts.infradead.org>
Subject: Re: [PATCH] dmaengine: imx-sdma: fix use-after-free on probe error
path
Hi,
On Fri, 5 Jul 2019 08:26:12 -0400 Sven Van Asbroeck wrote:
> Hi Vinod,
>
> On Fri, Jul 5, 2019 at 3:32 AM Vinod Koul <vkoul@...nel.org> wrote:
> >
> > > + if (ret)
> > > + dev_warn(&pdev->dev, "failed to get firmware name\n");
> >
> > if should have braces!
> > Applied after fixing braces!
>
> checkpatch.pl output after adding braces:
>
> WARNING: braces {} are not necessary for single statement blocks
> #102: FILE: drivers/dma/imx-sdma.c:2165:
> + if (ret) {
> + dev_warn(&pdev->dev, "failed to get firmware from device tree\n");
> + }
>
You changed the braces in the wrong place!
The comment applied to the previous 'if (ret)' which has an else clause
with braces, so the if clause needs braces too.
Lothar Waßmann
Powered by blists - more mailing lists