scsi: ses: do not add a device to an enclosure if enclosure_add_links() fails.
authorMaurizio Lombardi <mlombard@redhat.com>
Tue, 27 Jun 2017 09:53:27 +0000 (11:53 +0200)
committerBen Hutchings <ben@decadent.org.uk>
Thu, 12 Oct 2017 14:27:13 +0000 (15:27 +0100)
commit220a8988938da3f0d2c43080b74c78951d288d9f
tree12a4042c583556e385a46e50cc67d15900535804
parenta9f678e6b35a7bb32640b121a800e48e2cfff755
scsi: ses: do not add a device to an enclosure if enclosure_add_links() fails.

commit 62e62ffd95539b9220894a7900a619e0f3ef4756 upstream.

The enclosure_add_device() function should fail if it can't create the
relevant sysfs links.

Signed-off-by: Maurizio Lombardi <mlombard@redhat.com>
Tested-by: Douglas Miller <dougmill@linux.vnet.ibm.com>
Acked-by: James Bottomley <jejb@linux.vnet.ibm.com>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
drivers/misc/enclosure.c