From: kernel test robot <lkp@intel.com>
To: oe-kbuild@lists.linux.dev
Cc: lkp@intel.com, Dan Carpenter <error27@gmail.com>
Subject: drivers/net/wireless/ath/ath11k/debugfs.c:1009 ath11k_debugfs_soc_create() warn: passing zero to 'PTR_ERR'
Date: Sat, 15 Apr 2023 21:10:09 +0800 [thread overview]
Message-ID: <202304152142.ssXYxFdQ-lkp@intel.com> (raw)
BCC: lkp@intel.com
CC: oe-kbuild-all@lists.linux.dev
CC: linux-kernel@vger.kernel.org
TO: Kalle Valo <quic_kvalo@quicinc.com>
tree: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head: 7a934f4bd7d6f9da84c8812da3ba42ee10f5778e
commit: 323d91d4684d238f6bc3693fed93caf795378fe0 wifi: ath11k: debugfs: fix to work with multiple PCI devices
date: 3 months ago
:::::: branch date: 19 hours ago
:::::: commit date: 3 months ago
config: openrisc-randconfig-m041-20230414 (https://download.01.org/0day-ci/archive/20230415/202304152142.ssXYxFdQ-lkp@intel.com/config)
compiler: or1k-linux-gcc (GCC) 12.1.0
If you fix the issue, kindly add following tag where applicable
| Reported-by: kernel test robot <lkp@intel.com>
| Reported-by: Dan Carpenter <error27@gmail.com>
| Link: https://lore.kernel.org/r/202304152142.ssXYxFdQ-lkp@intel.com/
New smatch warnings:
drivers/net/wireless/ath/ath11k/debugfs.c:1009 ath11k_debugfs_soc_create() warn: passing zero to 'PTR_ERR'
Old smatch warnings:
drivers/net/wireless/ath/ath11k/debugfs.c:882 ath11k_write_fw_dbglog() warn: potential spectre issue 'ar->debug.module_id_bitmap' [w] (local cap)
drivers/net/wireless/ath/ath11k/debugfs.c:1022 ath11k_debugfs_soc_create() warn: passing zero to 'PTR_ERR'
vim +/PTR_ERR +1009 drivers/net/wireless/ath/ath11k/debugfs.c
da3a9d3c15769b Kalle Valo 2020-09-16 997
cb4e57db2ff0c8 Kalle Valo 2020-09-16 998 int ath11k_debugfs_soc_create(struct ath11k_base *ab)
da3a9d3c15769b Kalle Valo 2020-09-16 999 {
323d91d4684d23 Kalle Valo 2022-12-22 1000 struct dentry *root;
323d91d4684d23 Kalle Valo 2022-12-22 1001 bool dput_needed;
323d91d4684d23 Kalle Valo 2022-12-22 1002 char name[64];
323d91d4684d23 Kalle Valo 2022-12-22 1003 int ret;
323d91d4684d23 Kalle Valo 2022-12-22 1004
323d91d4684d23 Kalle Valo 2022-12-22 1005 root = debugfs_lookup("ath11k", NULL);
323d91d4684d23 Kalle Valo 2022-12-22 1006 if (!root) {
323d91d4684d23 Kalle Valo 2022-12-22 1007 root = debugfs_create_dir("ath11k", NULL);
323d91d4684d23 Kalle Valo 2022-12-22 1008 if (IS_ERR_OR_NULL(root))
323d91d4684d23 Kalle Valo 2022-12-22 @1009 return PTR_ERR(root);
323d91d4684d23 Kalle Valo 2022-12-22 1010
323d91d4684d23 Kalle Valo 2022-12-22 1011 dput_needed = false;
323d91d4684d23 Kalle Valo 2022-12-22 1012 } else {
323d91d4684d23 Kalle Valo 2022-12-22 1013 /* a dentry from lookup() needs dput() after we don't use it */
323d91d4684d23 Kalle Valo 2022-12-22 1014 dput_needed = true;
323d91d4684d23 Kalle Valo 2022-12-22 1015 }
323d91d4684d23 Kalle Valo 2022-12-22 1016
323d91d4684d23 Kalle Valo 2022-12-22 1017 scnprintf(name, sizeof(name), "%s-%s", ath11k_bus_str(ab->hif.bus),
323d91d4684d23 Kalle Valo 2022-12-22 1018 dev_name(ab->dev));
da3a9d3c15769b Kalle Valo 2020-09-16 1019
323d91d4684d23 Kalle Valo 2022-12-22 1020 ab->debugfs_soc = debugfs_create_dir(name, root);
323d91d4684d23 Kalle Valo 2022-12-22 1021 if (IS_ERR_OR_NULL(ab->debugfs_soc)) {
323d91d4684d23 Kalle Valo 2022-12-22 1022 ret = PTR_ERR(ab->debugfs_soc);
323d91d4684d23 Kalle Valo 2022-12-22 1023 goto out;
323d91d4684d23 Kalle Valo 2022-12-22 1024 }
323d91d4684d23 Kalle Valo 2022-12-22 1025
323d91d4684d23 Kalle Valo 2022-12-22 1026 ret = 0;
323d91d4684d23 Kalle Valo 2022-12-22 1027
323d91d4684d23 Kalle Valo 2022-12-22 1028 out:
323d91d4684d23 Kalle Valo 2022-12-22 1029 if (dput_needed)
323d91d4684d23 Kalle Valo 2022-12-22 1030 dput(root);
323d91d4684d23 Kalle Valo 2022-12-22 1031
323d91d4684d23 Kalle Valo 2022-12-22 1032 return ret;
da3a9d3c15769b Kalle Valo 2020-09-16 1033 }
da3a9d3c15769b Kalle Valo 2020-09-16 1034
--
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests
next reply other threads:[~2023-04-15 13:10 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-04-15 13:10 kernel test robot [this message]
-- strict thread matches above, loose matches on Subject: below --
2023-04-15 13:15 drivers/net/wireless/ath/ath11k/debugfs.c:1009 ath11k_debugfs_soc_create() warn: passing zero to 'PTR_ERR' Dan Carpenter
2023-04-17 14:42 ` Kalle Valo
2023-04-17 14:42 ` Kalle Valo
2023-05-08 5:00 kernel test robot
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=202304152142.ssXYxFdQ-lkp@intel.com \
--to=lkp@intel.com \
--cc=error27@gmail.com \
--cc=oe-kbuild@lists.linux.dev \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.