]> git.baikalelectronics.ru Git - kernel.git/commit
scsi: ufs: handle cleanup correctly on devm_reset_control_get error
authorPhillip Potter <phil@philpotter.co.uk>
Mon, 3 May 2021 11:56:58 +0000 (13:56 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 13 May 2021 15:33:41 +0000 (17:33 +0200)
commit24f54abf82b3a52c558c1b4aeaed6ca42549ba02
tree8597e15c92b143cf78f748776a4c70cc3e3d4d9b
parent80489386a5cd72ac32d186b864fa5d42522a90c8
scsi: ufs: handle cleanup correctly on devm_reset_control_get error

Move ufshcd_set_variant call in ufs_hisi_init_common to common error
section at end of the function, and then jump to this from the error
checking statements for both devm_reset_control_get and
ufs_hisi_get_resource. This fixes the original commit (4b3877507546)
which was reverted due to the University of Minnesota problems.

Suggested-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Cc: Avri Altman <avri.altman@wdc.com>
Cc: Martin K. Petersen <martin.petersen@oracle.com>
Cc: stable <stable@vger.kernel.org>
Signed-off-by: Phillip Potter <phil@philpotter.co.uk>
Link: https://lore.kernel.org/r/20210503115736.2104747-32-gregkh@linuxfoundation.org
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/scsi/ufs/ufs-hisi.c