Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1756713Ab3DOCnc (ORCPT ); Sun, 14 Apr 2013 22:43:32 -0400 Received: from mail.linuxfoundation.org ([140.211.169.12]:36434 "EHLO mail.linuxfoundation.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1756656Ab3DOCnb (ORCPT ); Sun, 14 Apr 2013 22:43:31 -0400 From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Joonyoung Shim , Mark Brown Subject: [ 02/27] ASoC: core: Fix to check return value of snd_soc_update_bits_locked() Date: Sun, 14 Apr 2013 19:43:01 -0700 Message-Id: <20130415024231.545985335@linuxfoundation.org> X-Mailer: git-send-email 1.8.2.1.368.g99c2266 In-Reply-To: <20130415024231.351969241@linuxfoundation.org> References: <20130415024231.351969241@linuxfoundation.org> User-Agent: quilt/0.60-1 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1131 Lines: 37 3.8-stable review patch. If anyone has any objections, please let me know. ------------------ From: Joonyoung Shim commit 0eaa6cca1f75e12e4f5ec62cbe887330fe3b5fe9 upstream. It can be 0 or 1 return value of snd_soc_update_bits_locked() when it is success. So just check return value is negative. Signed-off-by: Joonyoung Shim Signed-off-by: Mark Brown Signed-off-by: Greg Kroah-Hartman --- sound/soc/soc-core.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) --- a/sound/soc/soc-core.c +++ b/sound/soc/soc-core.c @@ -2959,7 +2959,7 @@ int snd_soc_put_volsw_range(struct snd_k val = val << shift; ret = snd_soc_update_bits_locked(codec, reg, val_mask, val); - if (ret != 0) + if (ret < 0) return ret; if (snd_soc_volsw_is_stereo(mc)) { -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/