From patchwork Fri Nov 14 11:26:49 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sudip Mukherjee X-Patchwork-Id: 5305211 Return-Path: X-Original-To: patchwork-alsa-devel@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork1.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.19.201]) by patchwork1.web.kernel.org (Postfix) with ESMTP id 2D4859F2ED for ; Fri, 14 Nov 2014 11:27:27 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 650132013D for ; Fri, 14 Nov 2014 11:27:26 +0000 (UTC) Received: from alsa0.perex.cz (alsa0.perex.cz [77.48.224.243]) by mail.kernel.org (Postfix) with ESMTP id 112CB2011B for ; Fri, 14 Nov 2014 11:27:25 +0000 (UTC) Received: by alsa0.perex.cz (Postfix, from userid 1000) id 25536260596; Fri, 14 Nov 2014 12:27:23 +0100 (CET) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Spam-Level: X-Spam-Status: No, score=-1.8 required=5.0 tests=BAYES_00, DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED, FREEMAIL_FROM, RCVD_IN_DNSWL_NONE, T_DKIM_INVALID, UNPARSEABLE_RELAY autolearn=no version=3.3.1 Received: from alsa0.perex.cz (localhost [IPv6:::1]) by alsa0.perex.cz (Postfix) with ESMTP id D2D802665AB; Fri, 14 Nov 2014 12:27:12 +0100 (CET) X-Original-To: alsa-devel@alsa-project.org Delivered-To: alsa-devel@alsa-project.org Received: by alsa0.perex.cz (Postfix, from userid 1000) id DBD9A260523; Fri, 14 Nov 2014 12:27:10 +0100 (CET) Received: from mail-pa0-f48.google.com (mail-pa0-f48.google.com [209.85.220.48]) by alsa0.perex.cz (Postfix) with ESMTP id 8865F260523 for ; Fri, 14 Nov 2014 12:27:02 +0100 (CET) Received: by mail-pa0-f48.google.com with SMTP id rd3so3780080pab.21 for ; Fri, 14 Nov 2014 03:27:01 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=from:to:cc:subject:date:message-id; bh=i/mH+YbnH6wBhUuB0CXZtC2nKuD+NiROmsD8v7s/e3M=; b=D8ljA20neoRBrxfGJEZGIoPux5ZRDzLQ6GdId81/t+rhhy8TCyGq2xdF19DVZWJPc/ +r6+2yfzL/o8h6vtpIMxrMLbbWTaVGeShPS0g4NXgAnwWR0uA+DjBUJbCVnvAxdmQJGO IOgclHqyeO7L7jphu1npjtbfxv0z+a6PNZpnSKhvuhcqKQFwI25AGWpNlJNCO4dz/2ZL 49HbRbegnmJPBiQU7itX43T6eDzx1tv4tN73aogoZSOlsOdKLOaYodK2OO+sSFANaO+0 vK00osoE3qTKsieeRJM99EKIy5WAnniOLyoa16zr2saSDAKCnTMordbvPrSo6b2CFr09 RJ2w== X-Received: by 10.70.89.200 with SMTP id bq8mr9449182pdb.57.1415964421082; Fri, 14 Nov 2014 03:27:01 -0800 (PST) Received: from localhost.localdomain ([122.169.174.121]) by mx.google.com with ESMTPSA id ns3sm27215808pbb.75.2014.11.14.03.26.58 for (version=TLSv1.1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Fri, 14 Nov 2014 03:27:00 -0800 (PST) From: Sudip Mukherjee To: Takashi Iwai Date: Fri, 14 Nov 2014 16:56:49 +0530 Message-Id: <1415964409-12580-1-git-send-email-sudipm.mukherjee@gmail.com> X-Mailer: git-send-email 1.8.1.2 Cc: alsa-devel@alsa-project.org, Sudip Mukherjee , linux-kernel@vger.kernel.org Subject: [alsa-devel] [PATCH v3] ALSA: ice1712: consider error value X-BeenThere: alsa-devel@alsa-project.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "Alsa-devel mailing list for ALSA developers - http://www.alsa-project.org" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Errors-To: alsa-devel-bounces@alsa-project.org Sender: alsa-devel-bounces@alsa-project.org X-Virus-Scanned: ClamAV using ClamSMTP earlier we were ignoring the return value of snd_ak4114_create and always returning 0. now we are returning the actual status. revo_init is calling this function, and revo_init is checking the return value. Signed-off-by: Sudip Mukherjee --- change in v3: spec->ak4114 is now dereferenced if we dont get an error value from snd_ak4114_create. sound/pci/ice1712/revo.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/sound/pci/ice1712/revo.c b/sound/pci/ice1712/revo.c index 1112ec1..24a7c6a 100644 --- a/sound/pci/ice1712/revo.c +++ b/sound/pci/ice1712/revo.c @@ -496,9 +496,10 @@ static int ap192_ak4114_init(struct snd_ice1712 *ice) ice, &spec->ak4114); /* AK4114 in Revo cannot detect external rate correctly. * No reason to stop capture stream due to incorrect checks */ - spec->ak4114->check_flags = AK4114_CHECK_NO_RATE; + if (err == 0) + spec->ak4114->check_flags = AK4114_CHECK_NO_RATE; - return 0; /* error ignored; it's no fatal error */ + return err; } static int revo_init(struct snd_ice1712 *ice)