]> git.baikalelectronics.ru Git - kernel.git/commit
scsi: libsas: Fix error path in sas_notify_lldd_dev_found()
authorDan Carpenter <dan.carpenter@oracle.com>
Sat, 5 Sep 2020 12:58:36 +0000 (15:58 +0300)
committerMartin K. Petersen <martin.petersen@oracle.com>
Thu, 10 Sep 2020 01:25:02 +0000 (21:25 -0400)
commit2d068e2a450889766ee39a2e2497039f9a9b7980
treec25abb948705b955cee69ac8770353062c39eeb1
parent57fdb922ae20a695a0164cef741d495be32528e9
scsi: libsas: Fix error path in sas_notify_lldd_dev_found()

In sas_notify_lldd_dev_found(), if we can't allocate the necessary
resources, then it seems like the wrong thing to mark the device as found
and to increment the reference count.  None of the callers ever drop the
reference in that situation.

[mkp: tweaked commit desc based on feedback from John]

Link: https://lore.kernel.org/r/20200905125836.GF183976@mwanda
Fixes: bf40b2f528df ("[SCSI] libsas: fix domain_device leak")
Reviewed-by: Jason Yan <yanaijie@huawei.com>
Acked-by: John Garry <john.garry@huawei.com>
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
drivers/scsi/libsas/sas_discover.c