Skip to content

Commit 9c67f90

Browse files
committed
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
2 parents 12cc3d5 + 1a8c67a commit 9c67f90

File tree

5 files changed

+8
-9
lines changed

5 files changed

+8
-9
lines changed

arch/arm64/Kconfig.platforms

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -266,6 +266,7 @@ config ARCH_QCOM
266266
bool "Qualcomm Platforms"
267267
select GPIOLIB
268268
select PINCTRL
269+
select HAVE_PWRCTL if PCI
269270
help
270271
This enables support for the ARMv8 based Qualcomm chipsets.
271272

drivers/net/wireless/ath/ath11k/Kconfig

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,7 @@ config ATH11K_PCI
2424
select MHI_BUS
2525
select QRTR
2626
select QRTR_MHI
27+
select PCI_PWRCTL_PWRSEQ if HAVE_PWRCTL
2728
help
2829
This module adds support for PCIE bus
2930

drivers/net/wireless/ath/ath12k/Kconfig

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ config ATH12K
77
select MHI_BUS
88
select QRTR
99
select QRTR_MHI
10+
select PCI_PWRCTL_PWRSEQ if HAVE_PWRCTL
1011
help
1112
Enable support for Qualcomm Technologies Wi-Fi 7 (IEEE
1213
802.11be) family of chipsets, for example WCN7850 and

drivers/pci/pwrctl/Kconfig

Lines changed: 3 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,12 @@
11
# SPDX-License-Identifier: GPL-2.0-only
22

3-
menu "PCI Power control drivers"
3+
config HAVE_PWRCTL
4+
bool
45

56
config PCI_PWRCTL
67
tristate
78

89
config PCI_PWRCTL_PWRSEQ
9-
tristate "PCI Power Control driver using the Power Sequencing subsystem"
10+
tristate
1011
select POWER_SEQUENCING
1112
select PCI_PWRCTL
12-
default m if ((ATH11K_PCI || ATH12K) && ARCH_QCOM)
13-
help
14-
Enable support for the PCI power control driver for device
15-
drivers using the Power Sequencing subsystem.
16-
17-
endmenu

drivers/power/sequencing/core.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -212,7 +212,8 @@ pwrseq_target_new(const struct pwrseq_target_data *data)
212212

213213
static void pwrseq_target_free(struct pwrseq_target *target)
214214
{
215-
pwrseq_unit_put(target->unit);
215+
if (!IS_ERR_OR_NULL(target->unit))
216+
pwrseq_unit_put(target->unit);
216217
kfree_const(target->name);
217218
kfree(target);
218219
}

0 commit comments

Comments
 (0)