scsi: ses: do not add a device to an enclosure if enclosure_add_links() fails.
commit542c097f1cb61f57ad42ffd8431371d69e76aa03
authorMaurizio Lombardi <mlombard@redhat.com>
Tue, 27 Jun 2017 09:53:27 +0000 (27 11:53 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 27 Jul 2017 22:07:59 +0000 (27 15:07 -0700)
tree2c4852d3b7fe81af8012bc50df74aeca9c4f784f
parentd2bb0af4463d0fd094385d8e15f8f18c9adaafa4
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: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/misc/enclosure.c