* [PATCH] hwmon: fix ptr_ret.cocci warnings [not found] <202010041453.4f94XEJB-lkp@intel.com> @ 2020-10-04 6:37 ` kernel test robot 0 siblings, 0 replies; 2+ messages in thread From: kernel test robot @ 2020-10-04 6:37 UTC (permalink / raw) To: Naveen Krishna Chatradhi Cc: kbuild-all, linux-hwmon, Guenter Roeck, Jean Delvare, linux-kernel From: kernel test robot <lkp@intel.com> drivers/hwmon/amd_energy.c:302:1-3: WARNING: PTR_ERR_OR_ZERO can be used Use PTR_ERR_OR_ZERO rather than if(IS_ERR(...)) + PTR_ERR Generated by: scripts/coccinelle/api/ptr_ret.cocci Fixes: 911766432fd2 ("hwmon: (amd_energy) Improve the accumulation logic") CC: Naveen Krishna Chatradhi <nchatrad@amd.com> Signed-off-by: kernel test robot <lkp@intel.com> --- tree: https://git.kernel.org/pub/scm/linux/kernel/git/groeck/linux-staging.git hwmon-next head: 78a28192e301da58ac408f2e98fa30aebafbfda0 commit: 911766432fd2a6054d9813845ad3f48120bd649c [45/55] hwmon: (amd_energy) Improve the accumulation logic amd_energy.c | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) --- a/drivers/hwmon/amd_energy.c +++ b/drivers/hwmon/amd_energy.c @@ -299,10 +299,7 @@ static int amd_energy_probe(struct platf data->wrap_accumulate = kthread_run(energy_accumulator, data, "%s", dev_name(hwmon_dev)); - if (IS_ERR(data->wrap_accumulate)) - return PTR_ERR(data->wrap_accumulate); - - return 0; + return PTR_ERR_OR_ZERO(data->wrap_accumulate); } static int amd_energy_remove(struct platform_device *pdev) ^ permalink raw reply [flat|nested] 2+ messages in thread
[parent not found: <202009100651.UfTNs7Q7%lkp@intel.com>]
* [PATCH] hwmon: fix ptr_ret.cocci warnings [not found] <202009100651.UfTNs7Q7%lkp@intel.com> @ 2020-09-09 22:45 ` kernel test robot 0 siblings, 0 replies; 2+ messages in thread From: kernel test robot @ 2020-09-09 22:45 UTC (permalink / raw) To: Guenter Roeck Cc: kbuild-all, Clemens Ladisch, Jean Delvare, linux-hwmon, linux-kernel From: kernel test robot <lkp@intel.com> drivers/hwmon/k10temp.c:548:1-3: WARNING: PTR_ERR_OR_ZERO can be used Use PTR_ERR_OR_ZERO rather than if(IS_ERR(...)) + PTR_ERR Generated by: scripts/coccinelle/api/ptr_ret.cocci Fixes: 11ba5c19102a ("hwmon: (k10temp) Take out debugfs code") Signed-off-by: kernel test robot <lkp@intel.com> --- tree: https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git master head: 7204eaa2c1f509066486f488c9dcb065d7484494 commit: 11ba5c19102a4b08f0549026f5491948d4f33d9d [6027/6354] hwmon: (k10temp) Take out debugfs code k10temp.c | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) --- a/drivers/hwmon/k10temp.c +++ b/drivers/hwmon/k10temp.c @@ -545,10 +545,7 @@ static int k10temp_probe(struct pci_dev hwmon_dev = devm_hwmon_device_register_with_info(dev, "k10temp", data, &k10temp_chip_info, NULL); - if (IS_ERR(hwmon_dev)) - return PTR_ERR(hwmon_dev); - - return 0; + return PTR_ERR_OR_ZERO(hwmon_dev); } static const struct pci_device_id k10temp_id_table[] = { ^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2020-10-04 6:38 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
[not found] <202010041453.4f94XEJB-lkp@intel.com>
2020-10-04 6:37 ` [PATCH] hwmon: fix ptr_ret.cocci warnings kernel test robot
[not found] <202009100651.UfTNs7Q7%lkp@intel.com>
2020-09-09 22:45 ` kernel test robot
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox