diff options
author | Arnd Bergmann <arnd@arndb.de> | 2016-10-10 13:12:58 +0200 |
---|---|---|
committer | Darren Hart <dvhart@linux.intel.com> | 2016-10-12 01:12:28 -0700 |
commit | 127595ed21c1bb24e20d488914b70ca7a643f7a4 (patch) | |
tree | c104bd156e074785c14ca2df8e73648e57f4df28 /net/l3mdev | |
parent | ea1a76bad8c9d0e7d91e7e4c9adf98fe3c7f09b7 (diff) | |
download | linux-127595ed21c1bb24e20d488914b70ca7a643f7a4.tar.bz2 |
platform/x86: intel_pmc_core: avoid boot time warning for !CONFIG_DEBUGFS_FS
While looking at a patch that introduced a compile-time warning
"‘pmc_core_dev_state_get’ defined but not used" (I sent a patch
for debugfs to fix it), I noticed that the same patch caused
it in intel_pmc_core also introduced a bogus run-time warning:
"PMC Core: debugfs register failed".
The problem is the IS_ERR_OR_NULL() check that as usual gets
things wrong: when CONFIG_DEBUGFS_FS is disabled,
debugfs_create_dir() fails with an error code, and we don't
need to warn about it, unlike the case in which it returns
NULL.
This reverts the driver to the previous state of not warning
about CONFIG_DEBUGFS_FS being disabled. I chose not to
restore the driver to making a runtime error in debugfs
fatal in pmc_core_probe().
Fixes: df2294fb6428 ("intel_pmc_core: Convert to DEFINE_DEBUGFS_ATTRIBUTE")
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Signed-off-by: Darren Hart <dvhart@linux.intel.com>
Diffstat (limited to 'net/l3mdev')
0 files changed, 0 insertions, 0 deletions