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:
Родитель
79bd23dadf
Коммит
0aeb904888
|
@ -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
|
||||
|
|
Загрузка…
Ссылка в новой задаче