mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Takashi Iwai <tiwai@suse.de>
To: Mariusz Kozlowski <m.kozlowski@tuxland.pl>
Cc: Jaroslav Kysela <perex@perex.cz>, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] sound: fix check for return value in snd_pcm_hw_refine
Date: Mon, 22 Jun 2009 07:56:35 +0200	[thread overview]
Message-ID: <s5hmy80olpo.wl%tiwai@suse.de> (raw)
In-Reply-To: <20090621202659.76ae16e8@mako-desktop>

At Sun, 21 Jun 2009 20:26:59 +0200,
Mariusz Kozlowski wrote:
> 
> Hello,
> 
> 'params' is a pointer and looking at the code this probably should be a check
> for ioctl return value.
> 
> 	Mariusz
> 
> 
> Signed-off-by: Mariusz Kozlowski <m.kozlowski@tuxland.pl>

Applied now.  Thanks!


Takashi

> 
> diff --git a/sound/core/pcm_native.c b/sound/core/pcm_native.c
> index 84da3ba..ac2150e 100644
> --- a/sound/core/pcm_native.c
> +++ b/sound/core/pcm_native.c
> @@ -320,7 +320,7 @@ int snd_pcm_hw_refine(struct snd_pcm_substream *substream,
>                      snd_mask_max(&params->masks[SNDRV_PCM_HW_PARAM_CHANNELS])) {
>  			changed = substream->ops->ioctl(substream,
>  					SNDRV_PCM_IOCTL1_FIFO_SIZE, params);
> -			if (params < 0)
> +			if (changed < 0)
>  				return changed;
>  		}
>  	}
> 

      reply	other threads:[~2009-06-22  5:56 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-06-21 18:26 Mariusz Kozlowski
2009-06-22  5:56 ` Takashi Iwai [this message]

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=s5hmy80olpo.wl%tiwai@suse.de \
    --to=tiwai@suse.de \
    --cc=linux-kernel@vger.kernel.org \
    --cc=m.kozlowski@tuxland.pl \
    --cc=perex@perex.cz \
    /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®