Matthew R. Ochs acfeb23b29 scsi: cxlflash: Avoid double free of character device
The device_unregister() service used when cleaning up the character
device is already responsible for the internal state associated with the
device upon successful creation. As the cxlflash driver does not obtain
a second reference to the character device, the explicit call to
put_device() is not required and can lead to an inconsistent sysfs among
other issues as the reference is no longer valid after the first
put_device() is performed.

Remove the unnecessary put_device() to remedy this issue.

Fixes: a834a36b57d9 ("scsi: cxlflash: Create character device to provide host management interface")
Signed-off-by: Matthew R. Ochs <mrochs@linux.vnet.ibm.com>
Reviewed-by: Hannes Reinecke <hare@suse.com>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
2017-07-01 17:01:03 -04:00
..
2017-05-04 19:15:35 -07:00
2015-11-25 22:08:55 -05:00
2016-05-10 22:01:07 -04:00
2017-06-12 20:48:01 -04:00
2016-02-25 21:10:53 -05:00
2017-05-04 12:19:44 -07:00
2017-03-23 12:04:05 -04:00
2016-01-27 20:36:10 +08:00
2017-06-27 21:31:12 -04:00
2016-01-27 20:36:10 +08:00
2017-05-04 12:19:44 -07:00
2017-04-26 15:09:04 -06:00
2016-02-23 21:27:02 -05:00
2016-11-28 15:51:31 -05:00
2017-04-13 13:58:20 -04:00
2017-05-04 12:19:44 -07:00
2017-06-27 21:31:12 -04:00
2017-05-04 12:19:44 -07:00
2017-06-26 15:00:58 -04:00
2017-05-04 12:19:44 -07:00
2017-05-11 23:14:36 -04:00
2016-02-23 21:27:02 -05:00
2017-04-07 17:07:14 -04:00
2015-11-18 11:59:09 -05:00
2017-04-26 18:32:29 -04:00
2017-02-21 11:51:42 -08:00
2017-03-15 19:27:46 -04:00