All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] drm/i915: Correct error handling for i915_gem_object_create_from_data()
@ 2017-03-17 20:53 Chris Wilson
  2017-03-17 22:42 ` Matthew Auld
  0 siblings, 1 reply; 2+ messages in thread
From: Chris Wilson @ 2017-03-17 20:53 UTC (permalink / raw)
  To: intel-gfx

i915_gem_object_create_from_data() always returns and error pointer on
failure, there is no need to check against NULL.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
---
 drivers/gpu/drm/i915/intel_uc.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/gpu/drm/i915/intel_uc.c b/drivers/gpu/drm/i915/intel_uc.c
index 86530c92337a..d15a7d9d4eb0 100644
--- a/drivers/gpu/drm/i915/intel_uc.c
+++ b/drivers/gpu/drm/i915/intel_uc.c
@@ -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;
 	}
 
-- 
2.11.0

_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH] drm/i915: Correct error handling for i915_gem_object_create_from_data()
  2017-03-17 20:53 [PATCH] drm/i915: Correct error handling for i915_gem_object_create_from_data() Chris Wilson
@ 2017-03-17 22:42 ` Matthew Auld
  0 siblings, 0 replies; 2+ messages in thread
From: Matthew Auld @ 2017-03-17 22:42 UTC (permalink / raw)
  To: Chris Wilson; +Cc: Intel Graphics Development

On 17 March 2017 at 20:53, Chris Wilson <chris@chris-wilson.co.uk> wrote:
> i915_gem_object_create_from_data() always returns and error pointer on
an error

> failure, there is no need to check against NULL.
>
> Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Reviewed-by: Matthew Auld <matthew.auld@intel.com>
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2017-03-17 22:43 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-03-17 20:53 [PATCH] drm/i915: Correct error handling for i915_gem_object_create_from_data() Chris Wilson
2017-03-17 22:42 ` Matthew Auld

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.