From: Martin Wilck <mwilck@xxxxxxxx> pqi_remove_device() checks if there's anything to remove, for both logical and SAS devices. So these conditionals are redundant. They may actually be wrong, because they would skip removing pysical devices which are not SMP expanders. Signed-off-by: Martin Wilck <mwilck@xxxxxxxx> --- drivers/scsi/smartpqi/smartpqi_init.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/drivers/scsi/smartpqi/smartpqi_init.c b/drivers/scsi/smartpqi/smartpqi_init.c index 87089b67ff74..7e4d5c5ea2b0 100644 --- a/drivers/scsi/smartpqi/smartpqi_init.c +++ b/drivers/scsi/smartpqi/smartpqi_init.c @@ -1879,8 +1879,7 @@ static void pqi_update_device_list(struct pqi_ctrl_info *ctrl_info, } else { pqi_dev_info(ctrl_info, "removed", device); } - if (pqi_is_device_added(device)) - pqi_remove_device(ctrl_info, device); + pqi_remove_device(ctrl_info, device); list_del(&device->delete_list_entry); pqi_free_device(device); } @@ -2223,8 +2222,7 @@ static void pqi_remove_all_scsi_devices(struct pqi_ctrl_info *ctrl_info) if (!device) break; - if (pqi_is_device_added(device)) - pqi_remove_device(ctrl_info, device); + pqi_remove_device(ctrl_info, device); pqi_free_device(device); } } -- 2.26.2