From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail-pf1-f171.google.com (mail-pf1-f171.google.com [209.85.210.171]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 96AFE3C3450 for ; Wed, 15 Jul 2026 09:56:18 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.210.171 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1784109379; cv=none; b=LsZtbHN0a9kct+FaH9sL+VnX+r2B94NQ6pZ39cWHXuwIb2wsn/7DDxCmWtDG49hrKBWd9vFe2fjgGEDTVFhWVey3EJQY0EhxmuMVKJZyAyk3ExY6HlBT1/kiINcfvaJwa03Pp7Fy6qVuoLwoakZ1yxwmzjceXdXYoQiHtL0f4vw= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1784109379; c=relaxed/simple; bh=rWAveW84L3R2k6Dr0kk7jzU9NyiQbaV6M5iGKNhBiKE=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=beun6vS7cqLckoP0dkMF5tEziSmSW7tza/sRzTHbhhuGXDrjCcTSYHMn6JxTFEvmeGc6sOnUsbbe2eG88ppmxcoOEfIQ78wh/sMiPR4/0wuyFo+KE77mNxTpbDcJH6hwlYnOzkXfBCK1flDGvg1awW1lYAeS5/vMdK+E/lejkE8= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com; spf=pass smtp.mailfrom=gmail.com; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b=pZ5o6f/Q; arc=none smtp.client-ip=209.85.210.171 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=gmail.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="pZ5o6f/Q" Received: by mail-pf1-f171.google.com with SMTP id d2e1a72fcca58-84867f07d63so5953688b3a.2 for ; Wed, 15 Jul 2026 02:56:18 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20251104; t=1784109378; x=1784714178; darn=vger.kernel.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to:content-type; bh=oH3dvIiif6Ezut/x+NGlXGEkxyluaoU8qD8m7W6CWsI=; b=pZ5o6f/QZSTQAKvdkHFJiSGFYev+BZnUKyp3NrDJaOB4ddaDTZLpClor3CyGkvpbgN 3KsYo6lAlR7GyOVYAZ9B7SjFzsBFWWDgH5yF1AwNuy69AuIjFKYHFfLaPJZx8WZes0V6 TLqQ+9I/6FVgPlZK5NDebdpf/AcUzQrbNI7ijWt1RJm5yUFhzx7bA7DZg4aa75myFxUX nxomHaAT12KVHjYOUpF8md2iZtQtNtFuIcAhVvELpiCvMJaURlNLVoEgxe1Jgyw7TFVt QaLYgGjV9SRW4ezTTbXQnDem5CgZiUDqbuggWwxFNR+5Z3KJfsOsxiryM/sLiTr1CdAT kMJg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1784109378; x=1784714178; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-gg:x-gm-message-state:from :to:cc:subject:date:message-id:reply-to:content-type; bh=oH3dvIiif6Ezut/x+NGlXGEkxyluaoU8qD8m7W6CWsI=; b=qcjVfncyMr27g0JdEi6tFY+YxpSnmVo58+w1UFkYUHzW2j5krE5Ftv7pqq6GxS7wA4 3mR5MNSFVLBduoZmZLvcN2QZLNaq1nXBpJWinnOU490+BP076yM39EQMZE4kmIY445P6 WQ6SbefFUS5AqxGqprHlPbS0FHE7bnIUtqYff7wjzF5xQiPGwbtjoa/eb0o7xcDRrckr r/nggCu1RisD8/yqNn2lFQ7uzDq+Z0np6OT+GEePjukkwQeTVqAUJU2kikGFeqLRLBh5 hkCLAqrPv9Mk9so93XbvRhc5pmbmTYyGkaVM94BcO6RmrFomPAcOQYIfklL7Jrco4Rs3 Vr2Q== X-Forwarded-Encrypted: i=1; AHgh+RqwpB8wc8nRnL0XWnX0E4kVdZKaq/pA18/UutuNID9fXGsGWgh/95TmNg0yR2ytn++yjCqTlFgWvbjACMw=@vger.kernel.org X-Gm-Message-State: AOJu0Yz0ZMag5OunahEZAXzEGEVHLe9MJYlyUrZaCSn7x0cYs9DeoGPe ciUPwMEKBu18MsHqZ2t88qfWtDLVrbHKP6SuVo5QPMIKu/2oy2/ioJE2 X-Gm-Gg: AfdE7clcIqT21yel1EApzpQmeXf58bs3VRMvcvuci2TH6FAyBZ185gSTd8+YJ5/snnp 5f4424kFMWVryZozc5q8r3kn3ZQz0fG28yMeRsOuzcEg65Z/JpInPORLeDz5G8eX0QdGrAjdBsl pgV0k6kv0Xj2XWv/KPRqHVpiGG2yMazfHn88Vd3XWx41q2dIDTyLqPw6Wq/KnYFaXSIkbXsfovS RIIMkqbptLm95/byfaikBY0dK59ZNSO1/pol0gxTKWZy743lXfN/mjFNFSbTgRIeAI11SnMdejc tPnkgn9gA2+cxv/B9YTxWi11NoJt4ooMEM25L2yQu+cnEEwwT1soKpG71GsDQPoWMHa+Pb1wPrC fn8K+OtjBm+rCXv4Q3/H5dafLTXXvzQU4ZwTgP4ZHD7f2HcVS01nBZVIQfhA8k+EJfTIyuemeT0 4k7xTk+5W3D4WO0JsEZAbE4oadgVqMDNI9hdKcZOXbjq3p/xQ= X-Received: by 2002:aa7:8891:0:b0:847:b2e4:9f68 with SMTP id d2e1a72fcca58-84a671da3aamr1648721b3a.9.1784109377872; Wed, 15 Jul 2026 02:56:17 -0700 (PDT) Received: from phuc-desktop.. ([183.91.15.56]) by smtp.gmail.com with ESMTPSA id 41be03b00d2f7-ca5b3643399sm11628908a12.22.2026.07.15.02.56.13 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 15 Jul 2026 02:56:17 -0700 (PDT) From: phucduc.bui@gmail.com To: Mark Brown , Liam Girdwood , Jaroslav Kysela , Takashi Iwai , Chen-Yu Tsai Cc: Jernej Skrabec , Samuel Holland , Charles Keepax , Kuninori Morimoto , Chen Ni , Marcus Cooper , Bjorn Helgaas , Danilo Krummrich , u.kleine-koenig@baylibre.com, linux-sunxi@lists.linux.dev, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-sound@vger.kernel.org, bui duc phuc Subject: [PATCH 5/6] ASoC: sunxi: sun50i-codec-analog: Improve probe error handling Date: Wed, 15 Jul 2026 16:55:24 +0700 Message-ID: <20260715095525.40668-6-phucduc.bui@gmail.com> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20260715095525.40668-1-phucduc.bui@gmail.com> References: <20260715095525.40668-1-phucduc.bui@gmail.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit From: bui duc phuc Drop the redundant error message after devm_platform_ioremap_resource(), which already reports failures, and use dev_err_probe() for regmap initialization errors. Signed-off-by: bui duc phuc --- sound/soc/sunxi/sun50i-codec-analog.c | 11 ++++------- 1 file changed, 4 insertions(+), 7 deletions(-) diff --git a/sound/soc/sunxi/sun50i-codec-analog.c b/sound/soc/sunxi/sun50i-codec-analog.c index 9f5b067a8ccc..50c0dee8c433 100644 --- a/sound/soc/sunxi/sun50i-codec-analog.c +++ b/sound/soc/sunxi/sun50i-codec-analog.c @@ -551,16 +551,13 @@ static int sun50i_codec_analog_probe(struct platform_device *pdev) bool enable; base = devm_platform_ioremap_resource(pdev, 0); - if (IS_ERR(base)) { - dev_err(&pdev->dev, "Failed to map the registers\n"); + if (IS_ERR(base)) return PTR_ERR(base); - } regmap = sun8i_adda_pr_regmap_init(&pdev->dev, base); - if (IS_ERR(regmap)) { - dev_err(&pdev->dev, "Failed to create regmap\n"); - return PTR_ERR(regmap); - } + if (IS_ERR(regmap)) + return dev_err_probe(&pdev->dev, PTR_ERR(regmap), + "Failed to create regmap\n"); enable = device_property_read_bool(&pdev->dev, "allwinner,internal-bias-resistor"); -- 2.43.0