From patchwork Fri Nov 14 12:42:21 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sudip Mukherjee X-Patchwork-Id: 5305791 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 BE0A69F818 for ; Fri, 14 Nov 2014 12:42:57 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id F2D5B20145 for ; Fri, 14 Nov 2014 12:42:56 +0000 (UTC) Received: from alsa0.perex.cz (alsa0.perex.cz [77.48.224.243]) by mail.kernel.org (Postfix) with ESMTP id 67A2520120 for ; Fri, 14 Nov 2014 12:42:55 +0000 (UTC) Received: by alsa0.perex.cz (Postfix, from userid 1000) id 3FDC32665EF; Fri, 14 Nov 2014 13:42:54 +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 1169D2665BB; Fri, 14 Nov 2014 13:42:44 +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 E9FE92665BD; Fri, 14 Nov 2014 13:42:42 +0100 (CET) Received: from mail-pa0-f45.google.com (mail-pa0-f45.google.com [209.85.220.45]) by alsa0.perex.cz (Postfix) with ESMTP id CD1AE266514 for ; Fri, 14 Nov 2014 13:42:34 +0100 (CET) Received: by mail-pa0-f45.google.com with SMTP id lf10so17437755pab.18 for ; Fri, 14 Nov 2014 04:42:33 -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=lrMryhTbTs9h27W1QS220pzH4K13FIr0kO2SWkYuuxY=; b=EnxbohDDFME8tw9g6IwWTo6bFwPV0nq3zQ3tUZtUrPrqAdKUeIkUvgHb3kbghjNkSb UPxItNvhKhNvuseVqUovkyOzfCiEekq6jExRjEMLHsGVxLZpGWkNUkIUPSIXDuybRZqf 1n3xtSnLm36EUOIVpXLdEws4rAuPbP7wgGZEEXRw63m2xVYypbfttV+DwkYXtLWM8Y++ 5UMK7GTKDq84vevGqBBacZSpgKCj7AbiaeaZlDW5vtgaKha0OqTQfwfazCcENGi4bV4l 8acRh6P/zfiaV0ARvQH/c69e4oGsNC5MbCT2Jow0u4rfWkdbAPnu63jooL3mSKmjuiFr BwAA== X-Received: by 10.68.225.162 with SMTP id rl2mr9633807pbc.129.1415968953028; Fri, 14 Nov 2014 04:42:33 -0800 (PST) Received: from localhost.localdomain ([122.169.177.32]) by mx.google.com with ESMTPSA id cz4sm27556375pdb.8.2014.11.14.04.42.30 for (version=TLSv1.1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Fri, 14 Nov 2014 04:42:32 -0800 (PST) From: Sudip Mukherjee To: Takashi Iwai Date: Fri, 14 Nov 2014 18:12:21 +0530 Message-Id: <1415968941-14181-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 v4] 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. change in v4: error value returned according to coding style. sound/pci/ice1712/revo.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/sound/pci/ice1712/revo.c b/sound/pci/ice1712/revo.c index 1112ec1..1d81ae6 100644 --- a/sound/pci/ice1712/revo.c +++ b/sound/pci/ice1712/revo.c @@ -494,11 +494,13 @@ static int ap192_ak4114_init(struct snd_ice1712 *ice) ap192_ak4114_write, ak4114_init_vals, ak4114_init_txcsb, ice, &spec->ak4114); + if (err < 0) + return err; /* 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; - return 0; /* error ignored; it's no fatal error */ + return 0; } static int revo_init(struct snd_ice1712 *ice)