summaryrefslogtreecommitdiffstats
path: root/net/sunrpc/sysfs.c
diff options
context:
space:
mode:
authorPaolo Bonzini <pbonzini@redhat.com>2022-09-02 01:21:27 +0200
committerPaolo Bonzini <pbonzini@redhat.com>2022-09-02 01:21:27 +0200
commit29250ba51bc1cbe8a87e923f76978b87c3247a8c (patch)
treeb6afc83e580ae3b746aa530434f56bb6fb80cc8b /net/sunrpc/sysfs.c
parentMerge tag 'kvm-riscv-fixes-6.0-1' of https://github.com/kvm-riscv/linux into ... (diff)
parentKVM: s390: pci: Hook to access KVM lowlevel from VFIO (diff)
downloadlinux-29250ba51bc1cbe8a87e923f76978b87c3247a8c.tar.xz
linux-29250ba51bc1cbe8a87e923f76978b87c3247a8c.zip
Merge tag 'kvm-s390-master-6.0-1' of git://git.kernel.org/pub/scm/linux/kernel/git/kvms390/linux into HEAD
PCI interpretation compile fixes
Diffstat (limited to 'net/sunrpc/sysfs.c')
-rw-r--r--net/sunrpc/sysfs.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/net/sunrpc/sysfs.c b/net/sunrpc/sysfs.c
index 7330eb9a70cf..c65c90ad626a 100644
--- a/net/sunrpc/sysfs.c
+++ b/net/sunrpc/sysfs.c
@@ -291,8 +291,10 @@ static ssize_t rpc_sysfs_xprt_state_change(struct kobject *kobj,
int offline = 0, online = 0, remove = 0;
struct rpc_xprt_switch *xps = rpc_sysfs_xprt_kobj_get_xprt_switch(kobj);
- if (!xprt)
- return 0;
+ if (!xprt || !xps) {
+ count = 0;
+ goto out_put;
+ }
if (!strncmp(buf, "offline", 7))
offline = 1;