mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Arnaud Pouliquen <arnaud.pouliquen@st.com>
To: David Binderman <dcb314@hotmail.com>,
	Olivier MOYSAN <olivier.moysan@st.com>,
	"lgirdwood@gmail.com" <lgirdwood@gmail.com>,
	"broonie@kernel.org" <broonie@kernel.org>,
	"perex@perex.cz" <perex@perex.cz>,
	"tiwai@suse.com" <tiwai@suse.com>,
	"mcoquelin.stm32@gmail.com" <mcoquelin.stm32@gmail.com>,
	Alexandre TORGUE <alexandre.torgue@st.com>,
	"alsa-devel@alsa-project.org" <alsa-devel@alsa-project.org>,
	"linux-stm32@st-md-mailman.stormreply.com" 
	<linux-stm32@st-md-mailman.stormreply.com>,
	"linux-arm-kernel@lists.infradead.org" 
	<linux-arm-kernel@lists.infradead.org>,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>
Subject: Re: linux-4.20-rc1/sound/soc/stm/stm32_sai_sub.c:343: Faulty error check
Date: Mon, 5 Nov 2018 15:24:09 +0100	[thread overview]
Message-ID: <ccd8a02d-13a0-432a-ecd0-94234a2cfd83@st.com> (raw)
In-Reply-To: <VI1PR08MB3342060AF73044939F5273F59CCA0@VI1PR08MB3342.eurprd08.prod.outlook.com>

Hello David,

On 11/5/18 2:33 PM, David Binderman wrote:
> Hello there,
> 
> linux-4.20-rc1/sound/soc/stm/stm32_sai_sub.c:343]: (style) Checking if
> unsigned variable 'div' is less than zero.
> 
> Source code is
> 
>         div = stm32_sai_get_clk_div(sai, parent_rate, rate);
>         if (div < 0)
>                 return div;
> 
> Suggest store return value from function in int local variable, test it
> and only then assign it into an unsigned variable.
> 
> Regards
> 
> David Binderman

Thanks for your feedback, a patch has already been sent and applied to
fix this warning: https://lkml.org/lkml/2018/11/5/510.

Regards,
Arnaud

           reply	other threads:[~2018-11-05 14:24 UTC|newest]

Thread overview: expand[flat|nested]  mbox.gz  Atom feed
 [parent not found: <VI1PR08MB3342060AF73044939F5273F59CCA0@VI1PR08MB3342.eurprd08.prod.outlook.com>]

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=ccd8a02d-13a0-432a-ecd0-94234a2cfd83@st.com \
    --to=arnaud.pouliquen@st.com \
    --cc=alexandre.torgue@st.com \
    --cc=alsa-devel@alsa-project.org \
    --cc=broonie@kernel.org \
    --cc=dcb314@hotmail.com \
    --cc=lgirdwood@gmail.com \
    --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=olivier.moysan@st.com \
    --cc=perex@perex.cz \
    --cc=tiwai@suse.com \
    /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

all inboxes | Powered by JetHome®