Received: by 2002:a05:6a10:af89:0:0:0:0 with SMTP id iu9csp3361895pxb; Mon, 17 Jan 2022 18:36:48 -0800 (PST) X-Google-Smtp-Source: ABdhPJzjEArZobpieCgT7IFIZ7dfdV5uKNincB8NBZR8O+iFsPrTeGO2IilFGNpNAqju1vUjtoCs X-Received: by 2002:a63:798a:: with SMTP id u132mr21072746pgc.561.1642473408124; Mon, 17 Jan 2022 18:36:48 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1642473408; cv=none; d=google.com; s=arc-20160816; b=GCtYEaHv5eBmhPD8RrfOs0PTkm+x2NmYAL+L/zk4323pd0+zWHo4cTEXei2CL4S14k 5Cs+I+5woNAryac8v1cRcY1yUeMfYJkzXeOzfD4gwahA0mh/U62iKNQQznJlC/N63p8l SN+JC8mpmFz3h2fUGawvj65F+4DqsE4Gq6LPLpTOAc8qDuHFSDeD66ZGCEy3SmK/Rd5x hs+sKhhx89Cf5ffIQk/6xEsIiE0Vj3aTIMnTfM3MsdZqFnLQEPoQHNYitMEFYlm+DPTw FLydFdRlCOUZFzx9UzpoODTjFFZReN6NltHLQaKpYqK5/w+k5ZClvyXBIK7emDGyP0bT lqrw== 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 :dkim-signature; bh=ckVtzevqA4xEJuoQpPtGyoEZQ52WPU9G2ryA25vdTls=; b=OJtsMRcU2PnYMXbX9EWAhIkzbKz5F+hX/nLyic2fFCPgPc5W0uRKilasJIb4jy1HBw DUx/ickW3W2DbZCN8mBp9m1rQTbQmLVkd5pl/9cXFWo03z3OiSQYeMrhVGGx6qZjR6SE TRSqanxrsUrlDVgXTxFaciKtPHvmzHLYHZer//TFX5m7HCwAarTyiPUc/TXsnu+plKmC ggi7IRWcp0+a1Ec7SieQgIJqxJHJtL9+f9+cHp7fvSb7BqwByWl5i72v5kM6cRkOmarM QFEadi+TLymj+l3MJne6caJe1zdZsQp+zfrEYsQT6yx87EVD6PrAuUWuGd5DiMju/01A qrgA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@cirrus.com header.s=PODMain02222019 header.b=K1jiK7zT; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=cirrus.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id r13si1093448pjp.79.2022.01.17.18.36.36; Mon, 17 Jan 2022 18:36:48 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@cirrus.com header.s=PODMain02222019 header.b=K1jiK7zT; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=cirrus.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S240792AbiAQQI5 (ORCPT + 99 others); Mon, 17 Jan 2022 11:08:57 -0500 Received: from mx0a-001ae601.pphosted.com ([67.231.149.25]:48504 "EHLO mx0b-001ae601.pphosted.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S240729AbiAQQIt (ORCPT ); Mon, 17 Jan 2022 11:08:49 -0500 Received: from pps.filterd (m0077473.ppops.net [127.0.0.1]) by mx0a-001ae601.pphosted.com (8.16.1.2/8.16.1.2) with ESMTP id 20HFFYHF025138; Mon, 17 Jan 2022 10:08:37 -0600 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=cirrus.com; h=from : to : cc : subject : date : message-id : in-reply-to : references : mime-version : content-transfer-encoding : content-type; s=PODMain02222019; bh=ckVtzevqA4xEJuoQpPtGyoEZQ52WPU9G2ryA25vdTls=; b=K1jiK7zTH68LhnKTRwBxnEYQNLryayc+bC5Sswo1kpNoU5z2iHf9C+ztpm2KqPtAyK6Q LZDKnTIdhsdBG0czs/AjH//WuQSjdX+mw5imVMn0CcWMPPzvKzFYY4IwluBonzrWrqul 0dx0HaiBGu9bGIWAoRMleQe0cXG39kDegj1cx0nczX3rGhM5jYrhXVn8JiBA9XQr2AZ3 L9QsTxXd36XJkOTvjp8FkfQJqxFoeMuhyVKRkh3ljoj44GblzaiUVKcQ7kpO1eBduv/P 0AKWmJJVuudQlArLdndJ38s/+pzRMbCUmlicgw1sQ0X4zbyXoX9Vizkt7fYRfg25vs1H pA== Received: from ediex01.ad.cirrus.com ([84.19.233.68]) by mx0a-001ae601.pphosted.com (PPS) with ESMTPS id 3dnaxhr22c-4 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128 verify=NOT); Mon, 17 Jan 2022 10:08:36 -0600 Received: from EDIEX01.ad.cirrus.com (198.61.84.80) by EDIEX01.ad.cirrus.com (198.61.84.80) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2375.18; Mon, 17 Jan 2022 16:08:33 +0000 Received: from ediswmail.ad.cirrus.com (198.61.86.93) by EDIEX01.ad.cirrus.com (198.61.84.80) with Microsoft SMTP Server id 15.1.2375.18 via Frontend Transport; Mon, 17 Jan 2022 16:08:33 +0000 Received: from aryzen.ad.cirrus.com (unknown [198.61.64.122]) by ediswmail.ad.cirrus.com (Postfix) with ESMTP id 1E92446C; Mon, 17 Jan 2022 16:08:33 +0000 (UTC) From: Lucas Tanure To: Jaroslav Kysela , Takashi Iwai , Mark Brown CC: , , , Lucas Tanure Subject: [PATCH v2 5/6] ALSA: hda: cs35l41: Make use of the helper function dev_err_probe() Date: Mon, 17 Jan 2022 16:08:29 +0000 Message-ID: <20220117160830.709403-5-tanureal@opensource.cirrus.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20220117160830.709403-1-tanureal@opensource.cirrus.com> References: <20220117160830.709403-1-tanureal@opensource.cirrus.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Content-Type: text/plain X-Proofpoint-GUID: LdW5S1a2eD39MAr7yv-u5LsfcYP51c3E X-Proofpoint-ORIG-GUID: LdW5S1a2eD39MAr7yv-u5LsfcYP51c3E X-Proofpoint-Spam-Reason: safe Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org When possible use dev_err_probe help to properly deal with the PROBE_DEFER error, the benefit is that DEFER issue will be logged in the devices_deferred debugfs file. Using dev_err_probe() can reduce code size, and the error value gets printed. Signed-off-by: Lucas Tanure --- V2: New patch with code split from Tidyup patch in this series --- sound/pci/hda/cs35l41_hda.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/sound/pci/hda/cs35l41_hda.c b/sound/pci/hda/cs35l41_hda.c index 82f982f574a9..c317b392c3e3 100644 --- a/sound/pci/hda/cs35l41_hda.c +++ b/sound/pci/hda/cs35l41_hda.c @@ -429,8 +429,7 @@ int cs35l41_hda_probe(struct device *dev, const char *device_name, int id, int i if (ret == -EBUSY) { dev_info(cs35l41->dev, "Reset line busy, assuming shared reset\n"); } else { - if (ret != -EPROBE_DEFER) - dev_err(cs35l41->dev, "Failed to get reset GPIO: %d\n", ret); + dev_err_probe(cs35l41->dev, ret, "Failed to get reset GPIO: %d\n", ret); goto err; } } -- 2.34.1