]> git.baikalelectronics.ru Git - kernel.git/commit
scsi: sas: scsi_queue_work can fail, so make callers aware
authorJohannes Thumshirn <jthumshirn@suse.de>
Wed, 14 Jun 2017 11:52:43 +0000 (13:52 +0200)
committerMartin K. Petersen <martin.petersen@oracle.com>
Wed, 28 Jun 2017 01:28:04 +0000 (21:28 -0400)
commit3188e7bfcd168a9c71bd4d5fce7e039183a51ef5
treeb5bbaaeaa6bb080b2687787f05dd057f574d91bc
parent0c384b6894c160223c6cb8323973925c3649360a
scsi: sas: scsi_queue_work can fail, so make callers aware

libsas uses scsi_queue_work() to queue its internal event notifications.
scsi_queue_work() can return -EINVAL if the work queue doesn't exist and
it does call queue_work() which can return false if the work is already
queued.

Make the SAS event code capable of returning errors up to the caller,
which is handy when changing to dynamically allocated work in libsas
as well, as discussed here: https://lkml.org/lkml/2017/6/14/121.

[mkp: fixed typo]

Signed-off-by: Johannes Thumshirn <jthumshirn@suse.de>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
drivers/scsi/libsas/sas_event.c
drivers/scsi/libsas/sas_internal.h
include/scsi/libsas.h