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)
committerMartin K. Petersen <martin.petersen@oracle.com>
Sat, 1 Jul 2017 20:52:38 +0000 (16:52 -0400)
commit62e62ffd95539b9220894a7900a619e0f3ef4756
tree79842861bc58d6abdf5181fcf9195af1800c1cc6
parent8dc0da7981a3f9680c873e92e3ec17308377e3b9
scsi: ses: do not add a device to an enclosure if enclosure_add_links() fails.

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

Cc: <stable@vger.kernel.org>
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>
drivers/misc/enclosure.c