diff mbox series

drm/i915/selftests: remove a condition

Message ID 20191213105050.y2v5nylsuxvc44jj@kili.mountain (mailing list archive)
State New, archived
Headers show
Series drm/i915/selftests: remove a condition | expand

Commit Message

Dan Carpenter Dec. 13, 2019, 10:50 a.m. UTC
We know that "err" is non-zero so there is no need to check.

Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
---
 drivers/gpu/drm/i915/selftests/i915_request.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

Comments

Chris Wilson Dec. 13, 2019, 10:59 a.m. UTC | #1
Quoting Dan Carpenter (2019-12-13 10:50:50)
> We know that "err" is non-zero so there is no need to check.
> 
> Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
> ---
>  drivers/gpu/drm/i915/selftests/i915_request.c | 3 +--
>  1 file changed, 1 insertion(+), 2 deletions(-)
> 
> diff --git a/drivers/gpu/drm/i915/selftests/i915_request.c b/drivers/gpu/drm/i915/selftests/i915_request.c
> index 99c94b4f69fb..71a4ca38fbac 100644
> --- a/drivers/gpu/drm/i915/selftests/i915_request.c
> +++ b/drivers/gpu/drm/i915/selftests/i915_request.c
> @@ -1086,8 +1086,7 @@ static int __live_parallel_engine1(void *arg)
>                 rq = i915_request_create(engine->kernel_context);
>                 if (IS_ERR(rq)) {
>                         err = PTR_ERR(rq);
> -                       if (err)
> -                               break;
> +                       break;

I don't know how that got there.
Reviewed-by: Chris Wilson <chris@chris-wilson.co.uk>
-Chris
diff mbox series

Patch

diff --git a/drivers/gpu/drm/i915/selftests/i915_request.c b/drivers/gpu/drm/i915/selftests/i915_request.c
index 99c94b4f69fb..71a4ca38fbac 100644
--- a/drivers/gpu/drm/i915/selftests/i915_request.c
+++ b/drivers/gpu/drm/i915/selftests/i915_request.c
@@ -1086,8 +1086,7 @@  static int __live_parallel_engine1(void *arg)
 		rq = i915_request_create(engine->kernel_context);
 		if (IS_ERR(rq)) {
 			err = PTR_ERR(rq);
-			if (err)
-				break;
+			break;
 		}
 
 		i915_request_get(rq);