* drivers/net/wireless/ath/ath11k/debugfs.c:1009 ath11k_debugfs_soc_create() warn: passing zero to 'PTR_ERR'
@ 2023-05-08 5:00 kernel test robot
0 siblings, 0 replies; 5+ messages in thread
From: kernel test robot @ 2023-05-08 5:00 UTC (permalink / raw)
To: oe-kbuild; +Cc: lkp, Dan Carpenter
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: ac9a78681b921877518763ba0e89202254349d1b
commit: 323d91d4684d238f6bc3693fed93caf795378fe0 wifi: ath11k: debugfs: fix to work with multiple PCI devices
date: 4 months ago
:::::: branch date: 8 hours ago
:::::: commit date: 4 months ago
config: arm64-randconfig-m041-20230428 (https://download.01.org/0day-ci/archive/20230508/202305081256.SwAOnoIq-lkp@intel.com/config)
compiler: aarch64-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/202305081256.SwAOnoIq-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
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: drivers/net/wireless/ath/ath11k/debugfs.c:1009 ath11k_debugfs_soc_create() warn: passing zero to 'PTR_ERR'
2023-04-15 13:15 Dan Carpenter
@ 2023-04-17 14:42 ` Kalle Valo
0 siblings, 0 replies; 5+ messages in thread
From: Kalle Valo @ 2023-04-17 14:42 UTC (permalink / raw)
To: Dan Carpenter; +Cc: oe-kbuild, lkp, oe-kbuild-all, linux-kernel, ath11k
+ ath11k list
Including the full report below.
Kalle
Dan Carpenter <error27@gmail.com> writes:
> 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
> 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:1022 ath11k_debugfs_soc_create() warn: passing zero to 'PTR_ERR'
>
> vim +/PTR_ERR +1009 drivers/net/wireless/ath/ath11k/debugfs.c
>
> 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);
>
> Debugfs used to return a mix of error pointers and NULL but we changed
> the NULL return to an error pointer to encourage people to just delete
> all debugfs error handling code.
>
> 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 }
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: drivers/net/wireless/ath/ath11k/debugfs.c:1009 ath11k_debugfs_soc_create() warn: passing zero to 'PTR_ERR'
@ 2023-04-17 14:42 ` Kalle Valo
0 siblings, 0 replies; 5+ messages in thread
From: Kalle Valo @ 2023-04-17 14:42 UTC (permalink / raw)
To: Dan Carpenter; +Cc: oe-kbuild, lkp, oe-kbuild-all, linux-kernel, ath11k
+ ath11k list
Including the full report below.
Kalle
Dan Carpenter <error27@gmail.com> writes:
> 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
> 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:1022 ath11k_debugfs_soc_create() warn: passing zero to 'PTR_ERR'
>
> vim +/PTR_ERR +1009 drivers/net/wireless/ath/ath11k/debugfs.c
>
> 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);
>
> Debugfs used to return a mix of error pointers and NULL but we changed
> the NULL return to an error pointer to encourage people to just delete
> all debugfs error handling code.
>
> 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 }
--
ath11k mailing list
ath11k@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/ath11k
^ permalink raw reply [flat|nested] 5+ messages in thread
* drivers/net/wireless/ath/ath11k/debugfs.c:1009 ath11k_debugfs_soc_create() warn: passing zero to 'PTR_ERR'
@ 2023-04-15 13:15 Dan Carpenter
2023-04-17 14:42 ` Kalle Valo
0 siblings, 1 reply; 5+ messages in thread
From: Dan Carpenter @ 2023-04-15 13:15 UTC (permalink / raw)
To: oe-kbuild, Kalle Valo; +Cc: lkp, oe-kbuild-all, linux-kernel
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
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:1022 ath11k_debugfs_soc_create() warn: passing zero to 'PTR_ERR'
vim +/PTR_ERR +1009 drivers/net/wireless/ath/ath11k/debugfs.c
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);
Debugfs used to return a mix of error pointers and NULL but we changed
the NULL return to an error pointer to encourage people to just delete
all debugfs error handling code.
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 }
--
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests
^ permalink raw reply [flat|nested] 5+ messages in thread
* drivers/net/wireless/ath/ath11k/debugfs.c:1009 ath11k_debugfs_soc_create() warn: passing zero to 'PTR_ERR'
@ 2023-04-15 13:10 kernel test robot
0 siblings, 0 replies; 5+ messages in thread
From: kernel test robot @ 2023-04-15 13:10 UTC (permalink / raw)
To: oe-kbuild; +Cc: lkp, Dan Carpenter
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
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2023-05-08 5:00 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-05-08 5:00 drivers/net/wireless/ath/ath11k/debugfs.c:1009 ath11k_debugfs_soc_create() warn: passing zero to 'PTR_ERR' kernel test robot
-- strict thread matches above, loose matches on Subject: below --
2023-04-15 13:15 Dan Carpenter
2023-04-17 14:42 ` Kalle Valo
2023-04-17 14:42 ` Kalle Valo
2023-04-15 13:10 kernel test robot
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.