aboutsummaryrefslogtreecommitdiffstats
path: root/drivers
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2020-09-15 16:30:20 -0700
committerLinus Torvalds <torvalds@linux-foundation.org>2020-09-15 16:30:20 -0700
commit9803ab172228d8509c72b34c703b9fe67cb94ddc (patch)
tree05d03d1518f46202f435c799b220dee3639c9b08 /drivers
parentMerge tag 'fixes-v5.9a' of git://git.kernel.org/pub/scm/linux/kernel/git/jmorris/linux-security (diff)
parentscsi: libsas: Fix error path in sas_notify_lldd_dev_found() (diff)
downloadlinux-dev-9803ab172228d8509c72b34c703b9fe67cb94ddc.tar.xz
linux-dev-9803ab172228d8509c72b34c703b9fe67cb94ddc.zip
Merge tag 'scsi-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi
Pull SCSI fix from James Bottomley: "Just one fix in libsas for a resource leak in an error path" * tag 'scsi-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi: scsi: libsas: Fix error path in sas_notify_lldd_dev_found()
Diffstat (limited to 'drivers')
-rw-r--r--drivers/scsi/libsas/sas_discover.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/drivers/scsi/libsas/sas_discover.c b/drivers/scsi/libsas/sas_discover.c
index cd7c7d269f6f..d0f9e90e3279 100644
--- a/drivers/scsi/libsas/sas_discover.c
+++ b/drivers/scsi/libsas/sas_discover.c
@@ -182,10 +182,11 @@ int sas_notify_lldd_dev_found(struct domain_device *dev)
pr_warn("driver on host %s cannot handle device %016llx, error:%d\n",
dev_name(sas_ha->dev),
SAS_ADDR(dev->sas_addr), res);
+ return res;
}
set_bit(SAS_DEV_FOUND, &dev->state);
kref_get(&dev->kref);
- return res;
+ return 0;
}