On 01/04/2018 02:04 PM, Jason Yan wrote: > The intend purpose here was to goto out if smp_execute_task() returned > error. Obviously something got screwed up. We will never get these link > error statistics below: > > ~:/sys/class/sas_phy/phy-1:0:12 # cat invalid_dword_count > 0 > ~:/sys/class/sas_phy/phy-1:0:12 # cat running_disparity_error_count > 0 > ~:/sys/class/sas_phy/phy-1:0:12 # cat loss_of_dword_sync_count > 0 > ~:/sys/class/sas_phy/phy-1:0:12 # cat phy_reset_problem_count > 0 > > Obviously we should goto error handler if smp_execute_task() returns > non-zero. > > Fixes: 2908d778ab3e ("[SCSI] aic94xx: new driver") > Signed-off-by: Jason Yan <yanai...@huawei.com> > CC: John Garry <john.ga...@huawei.com> > CC: chenqilin <chenqil...@huawei.com> > CC: chenxiang <chenxian...@hisilicon.com> > Reviewed-by: Christoph Hellwig <h...@lst.de> > --- > drivers/scsi/libsas/sas_expander.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/drivers/scsi/libsas/sas_expander.c > b/drivers/scsi/libsas/sas_expander.c > index 4b0c67f..6eab487 100644 > --- a/drivers/scsi/libsas/sas_expander.c > +++ b/drivers/scsi/libsas/sas_expander.c > @@ -686,7 +686,7 @@ int sas_smp_get_phy_events(struct sas_phy *phy) > res = smp_execute_task(dev, req, RPEL_REQ_SIZE, > resp, RPEL_RESP_SIZE); > > - if (!res) > + if (res) > goto out; > > phy->invalid_dword_count = scsi_to_u32(&resp[12]); > Reviewed-by: Hannes Reinecke <h...@suse.com>
Cheers, Hannes -- Dr. Hannes Reinecke zSeries & Storage h...@suse.com +49 911 74053 688 SUSE LINUX GmbH, Maxfeldstr. 5, 90409 Nürnberg GF: F. Imendörffer, J. Smithard, D. Upmanyu, G. Norton HRB 21284 (AG Nürnberg)