summaryrefslogtreecommitdiff
path: root/drivers/pci
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2021-10-08 16:46:09 -0700
committerLinus Torvalds <torvalds@linux-foundation.org>2021-10-08 16:46:09 -0700
commitf84fc4e36cd816d2d5dff0541f32fed411b0355f (patch)
treeea5f92a5549e4b8f61833273e7dcb3a9037dd300 /drivers/pci
parent5d6ab0bb408ffdaac585982faa9ec8c7d5cc349f (diff)
parenta46044a92add6a400f4dada7b943b30221f7cc80 (diff)
Merge tag 's390-5.15-5' of git://git.kernel.org/pub/scm/linux/kernel/git/s390/linux
Pull s390 fixes from Vasily Gorbik: - Fix potential memory leak on a error path in eBPF - Fix handling of zpci device on reserve * tag 's390-5.15-5' of git://git.kernel.org/pub/scm/linux/kernel/git/s390/linux: s390/pci: fix zpci_zdev_put() on reserve bpf, s390: Fix potential memory leak about jit_data
Diffstat (limited to 'drivers/pci')
-rw-r--r--drivers/pci/hotplug/s390_pci_hpc.c9
1 files changed, 1 insertions, 8 deletions
diff --git a/drivers/pci/hotplug/s390_pci_hpc.c b/drivers/pci/hotplug/s390_pci_hpc.c
index 014868752cd4..dcefdb42ac46 100644
--- a/drivers/pci/hotplug/s390_pci_hpc.c
+++ b/drivers/pci/hotplug/s390_pci_hpc.c
@@ -62,14 +62,7 @@ static int get_power_status(struct hotplug_slot *hotplug_slot, u8 *value)
struct zpci_dev *zdev = container_of(hotplug_slot, struct zpci_dev,
hotplug_slot);
- switch (zdev->state) {
- case ZPCI_FN_STATE_STANDBY:
- *value = 0;
- break;
- default:
- *value = 1;
- break;
- }
+ *value = zpci_is_device_configured(zdev) ? 1 : 0;
return 0;
}