summaryrefslogtreecommitdiff
path: root/drivers
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2024-07-19 14:31:18 -0700
committerLinus Torvalds <torvalds@linux-foundation.org>2024-07-19 14:31:18 -0700
commit9c67f9084af3f84e63abb44b82316fe0dbccd5d5 (patch)
treeeb17f64e3ecf9133f63df51b81fed779d658daf3 /drivers
parent12cc3d5389f313f07222b000fefa2cd8fc98c4f8 (diff)
parent1a8c67a8b21e26843d5641c55f48130b3e323ce8 (diff)
downloadlwn-9c67f9084af3f84e63abb44b82316fe0dbccd5d5.tar.gz
lwn-9c67f9084af3f84e63abb44b82316fe0dbccd5d5.zip
Merge tag 'pwrseq-fixes-for-v6.11-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/brgl/linux
Pull power sequencing fixes from Bartosz Golaszewski: "There's one fix for an invalid pointer dereference in error path reported by smatch and two patches that address the noisy config choices you reported earlier this week. Summary: - fix an invalid pointer dereference in error path in pwrseq core - reduce the Kconfig noise from PCI pwrctl choices" * tag 'pwrseq-fixes-for-v6.11-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/brgl/linux: arm64: qcom: don't select HAVE_PWRCTL when PCI=n Kconfig: reduce the amount of power sequencing noise power: sequencing: fix an invalid pointer dereference in error path
Diffstat (limited to 'drivers')
-rw-r--r--drivers/net/wireless/ath/ath11k/Kconfig1
-rw-r--r--drivers/net/wireless/ath/ath12k/Kconfig1
-rw-r--r--drivers/pci/pwrctl/Kconfig11
-rw-r--r--drivers/power/sequencing/core.c3
4 files changed, 7 insertions, 9 deletions
diff --git a/drivers/net/wireless/ath/ath11k/Kconfig b/drivers/net/wireless/ath/ath11k/Kconfig
index 27f0523bf967..2e935d381b6b 100644
--- a/drivers/net/wireless/ath/ath11k/Kconfig
+++ b/drivers/net/wireless/ath/ath11k/Kconfig
@@ -24,6 +24,7 @@ config ATH11K_PCI
select MHI_BUS
select QRTR
select QRTR_MHI
+ select PCI_PWRCTL_PWRSEQ if HAVE_PWRCTL
help
This module adds support for PCIE bus
diff --git a/drivers/net/wireless/ath/ath12k/Kconfig b/drivers/net/wireless/ath/ath12k/Kconfig
index eceab9153e98..f64e7c322216 100644
--- a/drivers/net/wireless/ath/ath12k/Kconfig
+++ b/drivers/net/wireless/ath/ath12k/Kconfig
@@ -7,6 +7,7 @@ config ATH12K
select MHI_BUS
select QRTR
select QRTR_MHI
+ select PCI_PWRCTL_PWRSEQ if HAVE_PWRCTL
help
Enable support for Qualcomm Technologies Wi-Fi 7 (IEEE
802.11be) family of chipsets, for example WCN7850 and
diff --git a/drivers/pci/pwrctl/Kconfig b/drivers/pci/pwrctl/Kconfig
index f1b824955d4b..54589bb2403b 100644
--- a/drivers/pci/pwrctl/Kconfig
+++ b/drivers/pci/pwrctl/Kconfig
@@ -1,17 +1,12 @@
# SPDX-License-Identifier: GPL-2.0-only
-menu "PCI Power control drivers"
+config HAVE_PWRCTL
+ bool
config PCI_PWRCTL
tristate
config PCI_PWRCTL_PWRSEQ
- tristate "PCI Power Control driver using the Power Sequencing subsystem"
+ tristate
select POWER_SEQUENCING
select PCI_PWRCTL
- default m if ((ATH11K_PCI || ATH12K) && ARCH_QCOM)
- help
- Enable support for the PCI power control driver for device
- drivers using the Power Sequencing subsystem.
-
-endmenu
diff --git a/drivers/power/sequencing/core.c b/drivers/power/sequencing/core.c
index 9c32b07a55e7..0ffc259c6bb6 100644
--- a/drivers/power/sequencing/core.c
+++ b/drivers/power/sequencing/core.c
@@ -212,7 +212,8 @@ pwrseq_target_new(const struct pwrseq_target_data *data)
static void pwrseq_target_free(struct pwrseq_target *target)
{
- pwrseq_unit_put(target->unit);
+ if (!IS_ERR_OR_NULL(target->unit))
+ pwrseq_unit_put(target->unit);
kfree_const(target->name);
kfree(target);
}