drm/i915: simplify gmbus xfer error checks

Shorter, easier to follow code with no functional changes. In all cases,
the return value ultimately comes from gmbus_wait_hw_status() anyway.

Reviewed-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
Signed-off-by: Jani Nikula <jani.nikula@intel.com>
Link: http://patchwork.freedesktop.org/patch/msgid/1448980166-23055-1-git-send-email-jani.nikula@intel.com
This commit is contained in:
Jani Nikula 2015-12-01 16:29:25 +02:00
parent 79bd23dadf
commit 0aeb904888
1 changed files with 4 additions and 8 deletions

View File

@ -505,17 +505,13 @@ retry:
ret = gmbus_xfer_write(dev_priv, &msgs[i]);
}
if (!ret)
ret = gmbus_wait_hw_status(dev_priv, GMBUS_HW_WAIT_PHASE,
GMBUS_HW_WAIT_EN);
if (ret == -ETIMEDOUT)
goto timeout;
if (ret == -ENXIO)
else if (ret)
goto clear_err;
ret = gmbus_wait_hw_status(dev_priv, GMBUS_HW_WAIT_PHASE,
GMBUS_HW_WAIT_EN);
if (ret == -ENXIO)
goto clear_err;
if (ret)
goto timeout;
}
/* Generate a STOP condition on the bus. Note that gmbus can't generata