soc: qcom: ramp_controller: Fix an error handling path in qcom_ramp_controller_probe()
Message ID | 84727a79d0261b4112411aec23b553504015c02c.1681684138.git.christophe.jaillet@wanadoo.fr |
---|---|
State | New |
Headers |
Return-Path: <linux-kernel-owner@vger.kernel.org> Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:b0ea:0:b0:3b6:4342:cba0 with SMTP id b10csp1781143vqo; Sun, 16 Apr 2023 16:20:44 -0700 (PDT) X-Google-Smtp-Source: AKy350Y4R6ZfnBfA1272f3ctO17zkutfj3QFdoOpzZp1FVMA46jP1pogTBRyamxaQvmjBbuQ/yDS X-Received: by 2002:a05:6a00:240b:b0:637:c959:8ea1 with SMTP id z11-20020a056a00240b00b00637c9598ea1mr17325781pfh.22.1681687243905; Sun, 16 Apr 2023 16:20:43 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1681687243; cv=none; d=google.com; s=arc-20160816; b=z8hSd/4+EzWGhBt35TNidrzKGU/cz3fjtn9QgPIGQq1KmltXYHpimMIqhhcB2831ZA FpHLJ0/kfZJrVoXzmarsoYHm0aBkYmkcQIxFTnrZ4ndskkTH5Rut6CmbVIFnOS1V7R5W W7tC8ZbAkzBr0h+53WRa2WAwMkQcCbbaWjLtpN47u15Z84d81teMe4wijSMHQLs3Mgjc 3VAI8MxLiesneVLqZDStp4A9Rg1z9t4botRsEtEhgIW5V6x1R5hpsyFWF2ZH4H9TcoR/ fUtvD4xEJwChx4EPcwtVDvKmBQ52gDsYQAW+R/E2JtCmo+RJPioxnkuZ7uGEYZUaWgC5 MbNQ== 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 :message-id:date:subject:cc:to:from:dkim-signature; bh=8Wl/JXKwfD+OAzKNoPx7F3mXgRxtmTroNRADhZKqXe4=; b=LaSanIb4ze+azdKP/XEgGtSlaPTHUkXGVWWDCocBcb/xnJs9eSonEf6Jm2qNeoTIG3 3TXAEOE+2cf1Nwo5job4F+TYVq07LYVstAyqYO88chAGLTDsPCxs9m36MKHAluo7z1dv 3Vsu8VEOXDY6nM5x0wcErJQQLKcKLO8WliD+Q3Y01UNJHp/yOshw7zBijStVc3DJBYLR OlpejqCP1MLzVR7mXrFhXu6aBGhQ4MOhlql1JlTGdLw7ZMUNlojQQZThuXxGCwMkeiE7 qVQVhA+VS3Zkj2YPtKp/cVsyIvEw1t1EBpz647mmtm2bNt2OvMPeBA+RABcRUKvLpVCE 8nLA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@orange.fr header.s=t20230301 header.b=GibIBA27; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id q1-20020aa79601000000b0063ab6bd69a0si10211127pfg.326.2023.04.16.16.20.27; Sun, 16 Apr 2023 16:20:43 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@orange.fr header.s=t20230301 header.b=GibIBA27; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230030AbjDPW3n (ORCPT <rfc822;yuanzuo1009@gmail.com> + 99 others); Sun, 16 Apr 2023 18:29:43 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:39482 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230016AbjDPW3m (ORCPT <rfc822;linux-kernel@vger.kernel.org>); Sun, 16 Apr 2023 18:29:42 -0400 Received: from smtp.smtpout.orange.fr (smtp-14.smtpout.orange.fr [80.12.242.14]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id E8EBC26AD for <linux-kernel@vger.kernel.org>; Sun, 16 Apr 2023 15:29:40 -0700 (PDT) Received: from pop-os.home ([86.243.2.178]) by smtp.orange.fr with ESMTPA id oAsKpjB2PjYHDoAsLpkxww; Mon, 17 Apr 2023 00:29:39 +0200 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=orange.fr; s=t20230301; t=1681684179; bh=8Wl/JXKwfD+OAzKNoPx7F3mXgRxtmTroNRADhZKqXe4=; h=From:To:Cc:Subject:Date; b=GibIBA27D/+YTPuxLJnn/hNkdxnNIF3BJmRdISCt+noAh0UTCAzfO3t8WfvwIb3yp ntquYxOsazbUzvEfjpey6c4LAou25FFuyH9s0+QKj0DMnxgy7kQJcK26g4G7+bpViR +YAYSVjAxfkQybX5AjeHsdW8nRJnoT/++aaOfVrClAZZpyTm5Cb/f04zm//+UPcGsI 9tkKE4INTIHJWPGnFXf50Td+PVkYy+LKUNYp2nMnEZMf6VHfy0BgV0WgzTvrnyepMI /4E81MajRpVZp2CL4u3ktfjX6YnZDNlxbvxeR1iSzz03yq/laK4N6/d3a8rjy66Qtp gHgOv7rq3RHzA== X-ME-Helo: pop-os.home X-ME-Auth: Y2hyaXN0b3BoZS5qYWlsbGV0QHdhbmFkb28uZnI= X-ME-Date: Mon, 17 Apr 2023 00:29:39 +0200 X-ME-IP: 86.243.2.178 From: Christophe JAILLET <christophe.jaillet@wanadoo.fr> To: Andy Gross <agross@kernel.org>, Bjorn Andersson <andersson@kernel.org>, Konrad Dybcio <konrad.dybcio@linaro.org>, AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com>, Dmitry Baryshkov <dmitry.baryshkov@linaro.org> Cc: linux-kernel@vger.kernel.org, kernel-janitors@vger.kernel.org, Christophe JAILLET <christophe.jaillet@wanadoo.fr>, linux-arm-msm@vger.kernel.org Subject: [PATCH] soc: qcom: ramp_controller: Fix an error handling path in qcom_ramp_controller_probe() Date: Mon, 17 Apr 2023 00:29:35 +0200 Message-Id: <84727a79d0261b4112411aec23b553504015c02c.1681684138.git.christophe.jaillet@wanadoo.fr> X-Mailer: git-send-email 2.34.1 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,RCVD_IN_DNSWL_NONE,RCVD_IN_MSPIKE_H2,SPF_HELO_PASS,SPF_PASS, T_SCC_BODY_TEXT_LINE,URIBL_BLOCKED autolearn=unavailable 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: <linux-kernel.vger.kernel.org> X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1763376883715362444?= X-GMAIL-MSGID: =?utf-8?q?1763376883715362444?= |
Series |
soc: qcom: ramp_controller: Fix an error handling path in qcom_ramp_controller_probe()
|
|
Commit Message
Christophe JAILLET
April 16, 2023, 10:29 p.m. UTC
'qrc' is known to be non-NULL at this point.
Checking for 'qrc->desc' was expected instead, so use it.
Fixes: a723c95fa137 ("soc: qcom: Add Qualcomm Ramp Controller driver")
Signed-off-by: Christophe JAILLET <christophe.jaillet@wanadoo.fr>
---
drivers/soc/qcom/ramp_controller.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
Comments
Il 17/04/23 00:29, Christophe JAILLET ha scritto: > 'qrc' is known to be non-NULL at this point. > Checking for 'qrc->desc' was expected instead, so use it. > > Fixes: a723c95fa137 ("soc: qcom: Add Qualcomm Ramp Controller driver") > Signed-off-by: Christophe JAILLET <christophe.jaillet@wanadoo.fr> Reviewed-by: AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com>
On Mon, 17 Apr 2023 00:29:35 +0200, Christophe JAILLET wrote: > 'qrc' is known to be non-NULL at this point. > Checking for 'qrc->desc' was expected instead, so use it. > > Applied, thanks! [1/1] soc: qcom: ramp_controller: Fix an error handling path in qcom_ramp_controller_probe() commit: b3d0dcc8e359cf5d57fb6308bc9750af5da574b3 Best regards,
diff --git a/drivers/soc/qcom/ramp_controller.c b/drivers/soc/qcom/ramp_controller.c index dc74d2a19de2..5e3ba0be0903 100644 --- a/drivers/soc/qcom/ramp_controller.c +++ b/drivers/soc/qcom/ramp_controller.c @@ -296,7 +296,7 @@ static int qcom_ramp_controller_probe(struct platform_device *pdev) return -ENOMEM; qrc->desc = device_get_match_data(&pdev->dev); - if (!qrc) + if (!qrc->desc) return -EINVAL; qrc->regmap = devm_regmap_init_mmio(&pdev->dev, base, &qrc_regmap_config);