Commit b57f7f7d authored by Michal Wajdeczko's avatar Michal Wajdeczko Committed by Joonas Lahtinen

drm/i915/uc: Move fw path check to fetch_uc_fw()

There is no reason to separately check for valid fw path before
we try to fetch it. Let the fetch function take care of this.
Signed-off-by: default avatarMichal Wajdeczko <michal.wajdeczko@intel.com>
Cc: Arkadiusz Hiler <arkadiusz.hiler@intel.com>
Cc: Joonas Lahtinen <joonas.lahtinen@linux.intel.com>
Reviewed-by: default avatarArkadiusz Hiler <arkadiusz.hiler@intel.com>
Signed-off-by: default avatarJoonas Lahtinen <joonas.lahtinen@linux.intel.com>
Link: http://patchwork.freedesktop.org/patch/msgid/20170330112115.120240-2-michal.wajdeczko@intel.com
parent 40908230
......@@ -112,6 +112,9 @@ static void fetch_uc_fw(struct drm_i915_private *dev_priv,
size_t size;
int err;
if (!uc_fw->path)
return;
uc_fw->fetch_status = INTEL_UC_FIRMWARE_PENDING;
DRM_DEBUG_DRIVER("before requesting firmware: uC fw fetch status %s\n",
......@@ -239,10 +242,7 @@ static void fetch_uc_fw(struct drm_i915_private *dev_priv,
void intel_uc_init_fw(struct drm_i915_private *dev_priv)
{
if (dev_priv->huc.fw.path)
fetch_uc_fw(dev_priv, &dev_priv->huc.fw);
if (dev_priv->guc.fw.path)
fetch_uc_fw(dev_priv, &dev_priv->guc.fw);
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment