From patchwork Wed Nov 21 09:06:55 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sachin Kamat X-Patchwork-Id: 13036 Return-Path: X-Original-To: patchwork@peony.canonical.com Delivered-To: patchwork@peony.canonical.com Received: from fiordland.canonical.com (fiordland.canonical.com [91.189.94.145]) by peony.canonical.com (Postfix) with ESMTP id 9876F23FC9 for ; Wed, 21 Nov 2012 09:21:45 +0000 (UTC) Received: from mail-ia0-f180.google.com (mail-ia0-f180.google.com [209.85.210.180]) by fiordland.canonical.com (Postfix) with ESMTP id 3D714A193B5 for ; Wed, 21 Nov 2012 09:21:45 +0000 (UTC) Received: by mail-ia0-f180.google.com with SMTP id t4so2348465iag.11 for ; Wed, 21 Nov 2012 01:21:44 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=x-forwarded-to:x-forwarded-for:delivered-to:received-spf:from:to:cc :subject:date:message-id:x-mailer:in-reply-to:references :x-gm-message-state; bh=LSB9BsWFBDtoHpt/1w6vPFloDSlTqV4H6oK17JfXLxY=; b=C8Bgz+qZ2rl/MPmDntqFh0q8RoiIYKWrN+O5v+BKZB6KTwHcIlwnVwLYzL9FYXVguz 87EdheBXz/W5mTmrfCqC7Mjz3L163ue9M0CEXeOwucJ+FFcuQC79JNkj1goYZBAnOK8w mG3Hk+mNeAEea7oS37nxSHDZfi+OYP06sY4UdcLnipHovmtkvsRr2eegIl9KtFZOhMju N394imDvA4X0ijRbnR8VuQKYi7UqQ0QirkOrTI1Lk8TFzlRZoIMzwoorLOz0W9a1T9+K ypJHK4mprh+GihD66sOlUf7BHyfxmWeEC/JubQ2CQuu+u0oBN78/Pj5vZ4yHGtK/A0bJ Mj1A== Received: by 10.50.187.197 with SMTP id fu5mr12813438igc.70.1353489704645; Wed, 21 Nov 2012 01:21:44 -0800 (PST) X-Forwarded-To: linaro-patchwork@canonical.com X-Forwarded-For: patch@linaro.org linaro-patchwork@canonical.com Delivered-To: patches@linaro.org Received: by 10.50.67.148 with SMTP id n20csp730igt; Wed, 21 Nov 2012 01:21:44 -0800 (PST) Received: by 10.68.253.232 with SMTP id ad8mr56723137pbd.73.1353489226101; Wed, 21 Nov 2012 01:13:46 -0800 (PST) Received: from mail-pa0-f45.google.com (mail-pa0-f45.google.com [209.85.220.45]) by mx.google.com with ESMTPS id m8si21530749pav.46.2012.11.21.01.13.16 (version=TLSv1/SSLv3 cipher=OTHER); Wed, 21 Nov 2012 01:13:46 -0800 (PST) Received-SPF: neutral (google.com: 209.85.220.45 is neither permitted nor denied by best guess record for domain of sachin.kamat@linaro.org) client-ip=209.85.220.45; Authentication-Results: mx.google.com; spf=neutral (google.com: 209.85.220.45 is neither permitted nor denied by best guess record for domain of sachin.kamat@linaro.org) smtp.mail=sachin.kamat@linaro.org Received: by mail-pa0-f45.google.com with SMTP id bg2so2623162pad.18 for ; Wed, 21 Nov 2012 01:13:16 -0800 (PST) Received: by 10.69.0.40 with SMTP id av8mr51707739pbd.117.1353489195986; Wed, 21 Nov 2012 01:13:15 -0800 (PST) Received: from localhost.localdomain ([115.113.119.130]) by mx.google.com with ESMTPS id mn5sm9621802pbc.12.2012.11.21.01.13.12 (version=TLSv1/SSLv3 cipher=OTHER); Wed, 21 Nov 2012 01:13:15 -0800 (PST) From: Sachin Kamat To: alsa-devel@alsa-project.org Cc: perex@perex.cz, tiwai@suse.de, broonie@opensource.wolfsonmicro.com, lrg@ti.com, sachin.kamat@linaro.org, patches@linaro.org Subject: [PATCH 2/6] ALSA: pcm: Fix return code in pcm_native.c Date: Wed, 21 Nov 2012 14:36:55 +0530 Message-Id: <1353488819-13902-2-git-send-email-sachin.kamat@linaro.org> X-Mailer: git-send-email 1.7.4.1 In-Reply-To: <1353488819-13902-1-git-send-email-sachin.kamat@linaro.org> References: <1353488819-13902-1-git-send-email-sachin.kamat@linaro.org> X-Gm-Message-State: ALoCoQkVpgAEaHVLzlyYRl2Sodt0jv9wDrSqrN8/ncqW2EmHTILnjpDTeFsniXocBIVDw1O/KE95 Return the value obtained from snd_pcm_hw_constraint_minmax() instead of -EINVAL. Silences the following smatch warning: sound/core/pcm_native.c:2003 snd_pcm_hw_constraints_complete() info: why not propagate 'err' from snd_pcm_hw_constraint_minmax() instead of -22? Signed-off-by: Sachin Kamat --- Build tested and based on linux-next 20121115. --- sound/core/pcm_native.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/sound/core/pcm_native.c b/sound/core/pcm_native.c index c76f6375..09b4286 100644 --- a/sound/core/pcm_native.c +++ b/sound/core/pcm_native.c @@ -2000,7 +2000,7 @@ int snd_pcm_hw_constraints_complete(struct snd_pcm_substream *substream) if (runtime->dma_bytes) { err = snd_pcm_hw_constraint_minmax(runtime, SNDRV_PCM_HW_PARAM_BUFFER_BYTES, 0, runtime->dma_bytes); if (err < 0) - return -EINVAL; + return err; } if (!(hw->rates & (SNDRV_PCM_RATE_KNOT | SNDRV_PCM_RATE_CONTINUOUS))) {