From: "thermal-bot for Srinivas Pandruvada" <tip-bot2@linutronix.de>
To: linux-pm@vger.kernel.org
Cc: kernel test robot <lkp@intel.com>,
Srinivas Pandruvada <srinivas.pandruvada@linux.intel.com>,
Daniel Lezcano <daniel.lezcano@linaro.org>,
rui.zhang@intel.com, amitk@kernel.org
Subject: [thermal: thermal/next] thermal/drivers/int340x/processor_thermal: Fix warning for return value
Date: Sun, 04 Jul 2021 18:02:25 -0000 [thread overview]
Message-ID: <162542174558.395.2511638474464107483.tip-bot2@tip-bot2> (raw)
In-Reply-To: <20210628183232.62877-1-srinivas.pandruvada@linux.intel.com>
The following commit has been merged into the thermal/next branch of thermal:
Commit-ID: ad079d981db6a4047b60c576df6430bed36bcd7d
Gitweb: https://git.kernel.org/pub/scm/linux/kernel/git/thermal/linux.git//ad079d981db6a4047b60c576df6430bed36bcd7d
Author: Srinivas Pandruvada <srinivas.pandruvada@linux.intel.com>
AuthorDate: Mon, 28 Jun 2021 11:32:32 -07:00
Committer: Daniel Lezcano <daniel.lezcano@linaro.org>
CommitterDate: Sun, 04 Jul 2021 18:28:04 +02:00
thermal/drivers/int340x/processor_thermal: Fix warning for return value
Fix smatch warnings:
drivers/thermal/intel/int340x_thermal/processor_thermal_device_pci.c:258 proc_thermal_pci_probe() warn: missing error code 'ret'
Use PTR_ERR to return failure of thermal_zone_device_register().
Reported-by: kernel test robot <lkp@intel.com>
Signed-off-by: Srinivas Pandruvada <srinivas.pandruvada@linux.intel.com>
Signed-off-by: Daniel Lezcano <daniel.lezcano@linaro.org>
Link: https://lore.kernel.org/r/20210628183232.62877-1-srinivas.pandruvada@linux.intel.com
---
drivers/thermal/intel/int340x_thermal/processor_thermal_device_pci.c | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/drivers/thermal/intel/int340x_thermal/processor_thermal_device_pci.c b/drivers/thermal/intel/int340x_thermal/processor_thermal_device_pci.c
index ad7e2e3..11dd2e8 100644
--- a/drivers/thermal/intel/int340x_thermal/processor_thermal_device_pci.c
+++ b/drivers/thermal/intel/int340x_thermal/processor_thermal_device_pci.c
@@ -254,8 +254,10 @@ static int proc_thermal_pci_probe(struct pci_dev *pdev, const struct pci_device_
pci_info->tzone = thermal_zone_device_register("TCPU_PCI", 1, 1, pci_info,
&tzone_ops,
&tzone_params, 0, 0);
- if (IS_ERR(pci_info->tzone))
+ if (IS_ERR(pci_info->tzone)) {
+ ret = PTR_ERR(pci_info->tzone);
goto err_ret_mmio;
+ }
/* request and enable interrupt */
ret = pci_alloc_irq_vectors(pdev, 1, 1, PCI_IRQ_ALL_TYPES);
prev parent reply other threads:[~2021-07-04 18:02 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-06-28 18:32 [PATCH -next] thermal: int340x: processor_thermal: Fix warning for return value Srinivas Pandruvada
2021-06-30 9:31 ` [thermal: thermal/next] thermal/drivers/int340x/processor_thermal: " thermal-bot for Srinivas Pandruvada
2021-07-04 18:02 ` thermal-bot for Srinivas Pandruvada [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=162542174558.395.2511638474464107483.tip-bot2@tip-bot2 \
--to=tip-bot2@linutronix.de \
--cc=amitk@kernel.org \
--cc=daniel.lezcano@linaro.org \
--cc=linux-pm@vger.kernel.org \
--cc=lkp@intel.com \
--cc=rui.zhang@intel.com \
--cc=srinivas.pandruvada@linux.intel.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).