Skip to content

Commit

Permalink
drm/i915: Correct error handling for i915_gem_object_create_from_data()
Browse files Browse the repository at this point in the history
i915_gem_object_create_from_data() always returns an error pointer on
failure, there is no need to check against NULL.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Link: http://patchwork.freedesktop.org/patch/msgid/20170317205317.7885-1-chris@chris-wilson.co.uk
Reviewed-by: Matthew Auld <matthew.auld@intel.com>
  • Loading branch information
Chris Wilson committed Mar 17, 2017
1 parent ce8ff09 commit f3ddd2c
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions drivers/gpu/drm/i915/intel_uc.c
Original file line number Diff line number Diff line change
Expand Up @@ -377,8 +377,8 @@ void intel_uc_prepare_fw(struct drm_i915_private *dev_priv,
uc_fw->major_ver_wanted, uc_fw->minor_ver_wanted);

obj = i915_gem_object_create_from_data(dev_priv, fw->data, fw->size);
if (IS_ERR_OR_NULL(obj)) {
err = obj ? PTR_ERR(obj) : -ENOMEM;
if (IS_ERR(obj)) {
err = PTR_ERR(obj);
goto fail;
}

Expand Down

0 comments on commit f3ddd2c

Please sign in to comment.