From patchwork Fri Jun 28 09:58:30 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Krzysztof Kozlowski X-Patchwork-Id: 13715913 Received: from mail-wr1-f49.google.com (mail-wr1-f49.google.com [209.85.221.49]) (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 7598F15358F for ; Fri, 28 Jun 2024 09:58:36 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.221.49 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1719568718; cv=none; b=BYR3GyWeIRgAiAqmciUl54EG35WOEjOhHRPce1SAPVln5R54XFmalm/8SG+y5cP0AVyVviJMNprIDCHBivkoCqjLSc7reUjgt1isUevKJGwIzqamMoWnqGmjG4xF9pbt6wxR/YDyKmyNfpo4QZow0wQ759vemtTZCDFUaxEqPIw= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1719568718; c=relaxed/simple; bh=ucYPMV442p30SxLxZMrLgQRWfuQy7jPceEvUT16eTtw=; h=From:To:Subject:Date:Message-ID:MIME-Version; b=GVx7rsRDaddlI0d9oQ29NEXBbAC9uTf5T3Q2qI+MpYOPiyD1o5aotSUZ1G2W2vhz+8V0PCg4QeI0/VM22VrxMX8ScQFX5kRQzow3VGmD+fcs8T/zgLa6sdHRACiN+xyPvW6rkg16Z3tJpaXbKASXn/AbA1pbfwIt0ZnXD80U4kI= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linaro.org; spf=pass smtp.mailfrom=linaro.org; dkim=pass (2048-bit key) header.d=linaro.org header.i=@linaro.org header.b=n4UX/Q3F; arc=none smtp.client-ip=209.85.221.49 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linaro.org Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=linaro.org Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=linaro.org header.i=@linaro.org header.b="n4UX/Q3F" Received: by mail-wr1-f49.google.com with SMTP id ffacd0b85a97d-367339bd00aso350914f8f.3 for ; Fri, 28 Jun 2024 02:58:36 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1719568715; x=1720173515; darn=vger.kernel.org; h=content-transfer-encoding:mime-version:message-id:date:subject:to :from:from:to:cc:subject:date:message-id:reply-to; bh=qnCrcRP7t2cWM1AO0t9JWEwOXAFYL4HbHcO1KAiAVOo=; b=n4UX/Q3Fw25r9RJRIiruRO34OmYaHSAnDVnilJShlC2vhOCgIla8fxMUxD77Hv4m2z WcDYjHuZQ3gTlZ41fcJFGkr6wmj84Rp6Zl/YJZhqkXsPkRQyYqGIB/f7ihg68CTkdJ0w 9XNSy7MonqTt6C/19l1eQe7jV/6vYH9GuLMcx3RatAa7WE/QqdUNF/HOKSJXyOaZdgTe FNKq+ab0cWjx+zRJM33QKXbYx6CLoD+THfcvCt76/r3kQx4tEZRGIhPPrgeNTJLnxXFg vSsqMdJzSdt84CbKHqorHPBc5dvSfvrcroPJhqfgKd/MhCsh76Yx9nmF7moP3o1zi6RG j3gg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1719568715; x=1720173515; h=content-transfer-encoding:mime-version:message-id:date:subject:to :from:x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=qnCrcRP7t2cWM1AO0t9JWEwOXAFYL4HbHcO1KAiAVOo=; b=mI9/WGD3ACR5jnky6WPqHfDYR1QEer5jP/IoJkVqGYlcuM2fr3xYfH4+2wZOHBzgvM UaqDi1pt/mYVMp7B3bVFkyCr+1JRNnv6PqwGNn9LpI/kUpajwJaUgBrYkHDw4JWRu3NI laHNDFMYRH0Nx0kqW8N3VdFpo5qPw+uNbUdO9HWI+Cr8+I7BO0qhczK1aDannTSbjgCC ziw+fwUaue/NeC/EgoPlH8u3lsSzvS8lKCnZIxnn8yicqJxERTEM1Wh3h4+N76oUIqQz j6+pbinHMs0PImHwYTpK0s0P3g6TkF18e/MuxQ4crpyKIOk8ZG4RJ+coW94flHcZGvR8 oOlw== X-Forwarded-Encrypted: i=1; AJvYcCUMpcxGDWn3oomYAsOlThbZ0BHALSlXPsv4LReXVSooIF+SpDp/OwqsfA+hZWr2FYzLYRFL/KgsD0y2FVNI2AMHJNbYGJ2jdYTGf7tYPg== X-Gm-Message-State: AOJu0Yyc5v08TbE7xpSxXLrWXvKyUXmPYyfcrc7pCdQ/Kz+xpReeJL3p oEv7xVGjdi5AI/gUx2bcCrPvjlq0/bRR6JH1RyBROkCmwgd7Htr4OQ2/QciFeok= X-Google-Smtp-Source: AGHT+IGj5zErCya6zo4TRvSCsMgDrJeZu+46l03p6bj9wmdPmAbzwhqn1j9jubXkm8l8eNFE6EkAUA== X-Received: by 2002:a05:6000:156a:b0:367:434f:ca9a with SMTP id ffacd0b85a97d-367434fcca3mr3973868f8f.0.1719568714852; Fri, 28 Jun 2024 02:58:34 -0700 (PDT) Received: from krzk-bin.. ([178.197.219.137]) by smtp.gmail.com with ESMTPSA id ffacd0b85a97d-3675a0e13d4sm1760802f8f.56.2024.06.28.02.58.33 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 28 Jun 2024 02:58:34 -0700 (PDT) From: Krzysztof Kozlowski To: Srinivas Kandagatla , Banajit Goswami , Liam Girdwood , Mark Brown , Jaroslav Kysela , Takashi Iwai , Dmitry Baryshkov , Krzysztof Kozlowski , alsa-devel@alsa-project.org, linux-arm-msm@vger.kernel.org, linux-sound@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH 1/2] ASoC: codecs: lpass-rx-macro: Fix using NULL pointer in probe() dev_err Date: Fri, 28 Jun 2024 11:58:30 +0200 Message-ID: <20240628095831.207942-1-krzysztof.kozlowski@linaro.org> X-Mailer: git-send-email 2.43.0 Precedence: bulk X-Mailing-List: linux-arm-msm@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 The 'rx->dev' is assigned closer to the end of the probe() function, so the dev_err() must not use it - it is still NULL at this point. Instead there is already a local 'dev' variable. Fixes: dbacef05898d ("ASoC: codec: lpass-rx-macro: prepare driver to accomdate new codec versions") Signed-off-by: Krzysztof Kozlowski Reviewed-by: Dmitry Baryshkov --- sound/soc/codecs/lpass-rx-macro.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sound/soc/codecs/lpass-rx-macro.c b/sound/soc/codecs/lpass-rx-macro.c index 08308a63d1b7..8d4a61f7debc 100644 --- a/sound/soc/codecs/lpass-rx-macro.c +++ b/sound/soc/codecs/lpass-rx-macro.c @@ -3843,7 +3843,7 @@ static int rx_macro_probe(struct platform_device *pdev) rx_2_5_defaults, sizeof(rx_2_5_defaults)); break; default: - dev_err(rx->dev, "Unsupported Codec version (%d)\n", rx->codec_version); + dev_err(dev, "Unsupported Codec version (%d)\n", rx->codec_version); ret = -EINVAL; goto err; } From patchwork Fri Jun 28 09:58:31 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Krzysztof Kozlowski X-Patchwork-Id: 13715914 Received: from mail-wm1-f43.google.com (mail-wm1-f43.google.com [209.85.128.43]) (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 E20AC153810 for ; Fri, 28 Jun 2024 09:58:37 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.128.43 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1719568720; cv=none; b=eoCW0azT0HA3+fL0XXxW+BHQkT8TS/KcCdUL9UrSRLdrfCqWIGpGSTYrbfc8DP1R6l5q/j+2qNaYQO50M8k0a1xZ7l4zsBZ2R+znqHvf73zHvpp+p8b8GdV0oFJB/TVbmFo5aBwtzNV6Syuwn6lhICH9kAO5Tu4wNhLLnDXQFOA= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1719568720; c=relaxed/simple; bh=pXcJZXfOduG19g33CWHG/iY96S5LfDhVExDtf7vtU/c=; h=From:To:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=bqdz7a2RbafAq39x8MVed16ZUH03fHO0WWZmvjQ0++mXqiF0ptFhxhWJuYIPtmMg/cktlUu3CGOSS4taqgXM5MqBhCf66yOuxRD67sUGG9YWKiLcqnpIcbtgbZdAiWPoB68ig4lZFxrydsc89UKf5ZpG8GEiTm+79eEEu+arWc8= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linaro.org; spf=pass smtp.mailfrom=linaro.org; dkim=pass (2048-bit key) header.d=linaro.org header.i=@linaro.org header.b=dz+L+4qP; arc=none smtp.client-ip=209.85.128.43 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linaro.org Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=linaro.org Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=linaro.org header.i=@linaro.org header.b="dz+L+4qP" Received: by mail-wm1-f43.google.com with SMTP id 5b1f17b1804b1-424acfff613so4679035e9.0 for ; Fri, 28 Jun 2024 02:58:37 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1719568716; x=1720173516; darn=vger.kernel.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:to:from:from:to:cc:subject:date:message-id :reply-to; bh=Vj7f8gpSZwh6TRqOjZfbXgm8n7bo9ud79bHIhbKk/yE=; b=dz+L+4qPwmPobYllr3Ngniq0eFwp2ZRhEcpIjKF/wsgOtH7w7+CJdSwwb6tw9uceZ6 0gNEv2TnNOGY0S/7/jSLUUo6QMXz5JsJih9oMXRJRv2EnkJCqB+1zFPUPR55fNm2eoNh TKgwNyszl9N/5pSDd/Mz7Ee7tx9Zz0YN8nywJCgq/rP1uVYgcCloYPKJjTUF1eBSCJYC ZHfppKjW210CVIh4mMrJ2LFkdx8Kh3nvNoXbyWAFbOZnmMaEZ4AV2vOxlMDMqw4hfK2W oEqhYdel/moqty8EVX6zfjw00sAi1IIZkHjQ7TNLPEsDU3kM3fcqFy3Gw+vbIwdIaj3t f8CA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1719568716; x=1720173516; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=Vj7f8gpSZwh6TRqOjZfbXgm8n7bo9ud79bHIhbKk/yE=; b=bttxg31H3x6iEgxbU9ZKTycET0iJaPU+l4rUxm+YXoKYjOiIs0QXq8tL+1itNYEeFk 69I26PkVvFVtOdPIngjSpwnfdMTlcOE9lNwqGdFYlDHEZYuKnI9KKNUeZkV4AFhmHe8X hjhSBWqKicjMVHaSIX7e8WPuaVAr/gBF/atvH+gj13XoxIcou+rwlsT+d+6OwZxpAc4+ S7FcIzjCGw5QqbSLHiA2PvAx6OzBWv5mMsCLRVfh4DYlF6eg9yIqc97SkuVGDQvRLDBi FtdD2a1XWF51Hj68wp0mSskC2InTWppfkQ5ZIGTu/YV69JkHADX26xt8HrP84W+lmZKg N1lw== X-Forwarded-Encrypted: i=1; AJvYcCXbcCDpqxxmHMvplrm9sotGs9T4qpQp+YgnZ90wt9hI8bXUIzfFd0W6Jl0sCecNnr6cTxN5KVMGwkWCGvTq5UqQ3Dch6+c7SABmms7DHQ== X-Gm-Message-State: AOJu0Yw/LaSKlus5W+QWCXw8G8cVwAPcnXeifGYnp+v6+bXbqV0iGJ6k mSIEkdg1X2dv9ZTBlQlMrM80VcqF57jz8pTPyX/MiSVb/cFD27k5GsXc75whfsc= X-Google-Smtp-Source: AGHT+IGOECgt/Tx2J3NULa0P6WR60IFU9SZLYVOKALAhoMlIlXENOp0BXYMSZmaQsxPOdOKobn4xsw== X-Received: by 2002:a05:600c:1e1e:b0:425:6a52:eaa5 with SMTP id 5b1f17b1804b1-4256a52ec38mr15858465e9.41.1719568716326; Fri, 28 Jun 2024 02:58:36 -0700 (PDT) Received: from krzk-bin.. ([178.197.219.137]) by smtp.gmail.com with ESMTPSA id ffacd0b85a97d-3675a0e13d4sm1760802f8f.56.2024.06.28.02.58.35 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 28 Jun 2024 02:58:35 -0700 (PDT) From: Krzysztof Kozlowski To: Srinivas Kandagatla , Banajit Goswami , Liam Girdwood , Mark Brown , Jaroslav Kysela , Takashi Iwai , Dmitry Baryshkov , Krzysztof Kozlowski , alsa-devel@alsa-project.org, linux-arm-msm@vger.kernel.org, linux-sound@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH 2/2] ASoC: codecs: lpass-wsa-macro: Fix using NULL pointer in probe() dev_err Date: Fri, 28 Jun 2024 11:58:31 +0200 Message-ID: <20240628095831.207942-2-krzysztof.kozlowski@linaro.org> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20240628095831.207942-1-krzysztof.kozlowski@linaro.org> References: <20240628095831.207942-1-krzysztof.kozlowski@linaro.org> Precedence: bulk X-Mailing-List: linux-arm-msm@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 The 'wsa->dev' is assigned closer to the end of the probe() function, so the dev_err() must not use it - it is still NULL at this point. Instead there is already a local 'dev' variable. Fixes: 727de4fbc546 ("ASoC: codecs: lpass-wsa-macro: Correct support for newer v2.5 version") Signed-off-by: Krzysztof Kozlowski Reviewed-by: Dmitry Baryshkov --- sound/soc/codecs/lpass-wsa-macro.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sound/soc/codecs/lpass-wsa-macro.c b/sound/soc/codecs/lpass-wsa-macro.c index f619b06b8aec..14e0cc4fbff3 100644 --- a/sound/soc/codecs/lpass-wsa-macro.c +++ b/sound/soc/codecs/lpass-wsa-macro.c @@ -2798,7 +2798,7 @@ static int wsa_macro_probe(struct platform_device *pdev) break; default: - dev_err(wsa->dev, "Unsupported Codec version (%d)\n", wsa->codec_version); + dev_err(dev, "Unsupported Codec version (%d)\n", wsa->codec_version); return -EINVAL; }