Received: by 2002:a05:7412:8d10:b0:f3:1519:9f41 with SMTP id bj16csp1329649rdb; Wed, 6 Dec 2023 16:01:41 -0800 (PST) X-Google-Smtp-Source: AGHT+IHRmXlo4ytlED81/iB1JTWNhpzMKFeK2jQQ6AXQs/Eq2UzWl69Rpp/QA1gZicKAKDBc41qz X-Received: by 2002:a17:902:d346:b0:1d0:6ffd:6e61 with SMTP id l6-20020a170902d34600b001d06ffd6e61mr1508727plk.89.1701907301467; Wed, 06 Dec 2023 16:01:41 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1701907301; cv=none; d=google.com; s=arc-20160816; b=dEqGUPCfNGR5yF8W4yNI5ncnbGtGYBWFfX8HEu4f4YG69uMuUQSO+TbfuIvsKq4/7O h3BXwz5b4wHxqCCoBn6L6JBXJtzUA/aBXWjZNViJdWHHgOThXBwJtKjE2LdUSwQVwx97 pB/5vaHGjdYF+LYBeJTr8gJKULlm+DTWzmcxrykRKILqTouGPJhFaGVG9k293S6nPFes jirAKfLgABiSnHQWSMnpWWcn37UrEYnzq3GfP49ivOf76XIbTT2TbSMpaH8Sh/orJm2f IAFZ7oKjmx9usR1zl8z/X/OXKKY+MR+jjMr1glT+RHJfCMXOYK9Lsb/CeA6J6hu6ODgE +d/w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from; bh=jCR3o+49Hx+oHSoawZeuYOFQm3N6SDwvZ8WSa+sSvPs=; fh=zySoyVfK/7ExaDz2MWyww8poQ40q3tZak5TTvfb/Ovc=; b=D2SodK9foDfBN4DmTI+K69ntQWFALFuVfRedZQwk8LZHsrYN9alUg2/Dz4x5Z4B/dY /ikIz4tDHz9YJa22x6NiXUWam2l7oOt3SLE4wm/UhYEHxMRNLQQP+YDLKEo6y3DimsPw MbqCbepoJkXh20IF0E/aD+eJGs+6P7Ea8ghi5qsorMqwyaC/+DnU13IhGP2QG+cZagBr uxK+jN9tinej/+5JJml8R7JbVXsCQRyDxcMiwqIB03iwZ5YrN7S9Pqxqb76+lvsbuvwl L55n1Zd5gRHdgK4h3vvHs+0hSr7ZG/9XfBHckoI6d93iJImBbI66yXOc2gvY/Lhbonvq iKRA== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.37 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=irl.hu Return-Path: Received: from snail.vger.email (snail.vger.email. [23.128.96.37]) by mx.google.com with ESMTPS id a4-20020a1709027d8400b001d0050e2452si70387plm.45.2023.12.06.16.01.41 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 06 Dec 2023 16:01:41 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.37 as permitted sender) client-ip=23.128.96.37; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.37 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=irl.hu Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by snail.vger.email (Postfix) with ESMTP id 37292802A550; Wed, 6 Dec 2023 16:00:23 -0800 (PST) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.11 at snail.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232370AbjLGAAL (ORCPT + 99 others); Wed, 6 Dec 2023 19:00:11 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:50716 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231264AbjLGAAA (ORCPT ); Wed, 6 Dec 2023 19:00:00 -0500 Received: from irl.hu (irl.hu [95.85.9.111]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 9025111F for ; Wed, 6 Dec 2023 16:00:06 -0800 (PST) Received: from fedori.lan (51b690cd.dsl.pool.telekom.hu [::ffff:81.182.144.205]) (AUTH: CRAM-MD5 soyer@irl.hu, ) by irl.hu with ESMTPSA id 00000000000716EA.0000000065710B04.00119040; Thu, 07 Dec 2023 01:00:03 +0100 From: Gergo Koteles To: Shenghao Ding , Kevin Lu , Baojun Xu , Jaroslav Kysela , Takashi Iwai , Liam Girdwood , Mark Brown Cc: linux-kernel@vger.kernel.org, alsa-devel@alsa-project.org, Gergo Koteles Subject: [PATCH 04/16] ALSA: hda/tas2781: handle missing calibration data Date: Thu, 7 Dec 2023 00:59:45 +0100 Message-ID: X-Mailer: git-send-email 2.43.0 In-Reply-To: References: Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-Mime-Autoconverted: from 8bit to 7bit by courier 1.0 X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_BLOCKED,SPF_HELO_PASS,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (snail.vger.email [0.0.0.0]); Wed, 06 Dec 2023 16:00:23 -0800 (PST) Also check the return value of the first get_variable call. Signed-off-by: Gergo Koteles --- sound/pci/hda/tas2781_hda_i2c.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/sound/pci/hda/tas2781_hda_i2c.c b/sound/pci/hda/tas2781_hda_i2c.c index d272d3d08b29..7c286802b273 100644 --- a/sound/pci/hda/tas2781_hda_i2c.c +++ b/sound/pci/hda/tas2781_hda_i2c.c @@ -455,9 +455,9 @@ static int tas2781_save_calibration(struct tasdevice_priv *tas_priv) status = efi.get_variable(efi_name, &efi_guid, &attr, &tas_priv->cali_data.total_sz, tas_priv->cali_data.data); - if (status != EFI_SUCCESS) - return -EINVAL; } + if (status != EFI_SUCCESS) + return -EINVAL; tmp_val = (unsigned int *)tas_priv->cali_data.data; -- 2.43.0