scsi: zfcp: Move the position of put_device()
Place the put_device() call after device_unregister() in both zfcp_unit_remove() and zfcp_sysfs_port_remove_store() to make it more natural. put_device() ought to be the last time we touch the object in both functions. Add comments after put_device() to make code clearer. Link: https://lore.kernel.org/r/0a568c7733ba0f1dde28b0c663b90270d44dd540.1618417667.git.bblock@linux.ibm.com Suggested-by: Steffen Maier <maier@linux.ibm.com> Suggested-by: Benjamin Block <bblock@linux.ibm.com> Signed-off-by: Qinglang Miao <miaoqinglang@huawei.com> Signed-off-by: Benjamin Block <bblock@linux.ibm.com> Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
Please register or sign in to comment