public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Mariusz Kozlowski <m.kozlowski@tuxland.pl>
To: Jaroslav Kysela <perex@perex.cz>
Cc: Takashi Iwai <tiwai@suse.de>, linux-kernel@vger.kernel.org
Subject: [PATCH] sound: fix check for return value in snd_pcm_hw_refine
Date: Sun, 21 Jun 2009 20:26:59 +0200	[thread overview]
Message-ID: <20090621202659.76ae16e8@mako-desktop> (raw)

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>

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-21 18:35 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-06-21 18:26 Mariusz Kozlowski [this message]
2009-06-22  5:56 ` [PATCH] sound: fix check for return value in snd_pcm_hw_refine Takashi Iwai

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=20090621202659.76ae16e8@mako-desktop \
    --to=m.kozlowski@tuxland.pl \
    --cc=linux-kernel@vger.kernel.org \
    --cc=perex@perex.cz \
    --cc=tiwai@suse.de \
    /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