diff mbox series

[v2] drm/i915/selftest: Fix an error code in live_noa_gpr()

Message ID 20200714143652.GA337376@mwanda (mailing list archive)
State New, archived
Headers show
Series [v2] drm/i915/selftest: Fix an error code in live_noa_gpr() | expand

Commit Message

Dan Carpenter July 14, 2020, 2:36 p.m. UTC
The error code needs to be set on this path.  It currently returns
success.

Fixes: ed2690a9ca89 ("drm/i915/selftest: Check that GPR are restored across noa_wait")
Reported-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
---
v2: Fix a different bug instead.  :P  Colin fixed mine already.

 drivers/gpu/drm/i915/selftests/i915_perf.c | 1 +
 1 file changed, 1 insertion(+)

Comments

Lionel Landwerlin July 14, 2020, 2:39 p.m. UTC | #1
On 14/07/2020 17:36, Dan Carpenter wrote:
> The error code needs to be set on this path.  It currently returns
> success.
>
> Fixes: ed2690a9ca89 ("drm/i915/selftest: Check that GPR are restored across noa_wait")
> Reported-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
> Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
> ---
> v2: Fix a different bug instead.  :P  Colin fixed mine already.
>
>   drivers/gpu/drm/i915/selftests/i915_perf.c | 1 +
>   1 file changed, 1 insertion(+)
>
> diff --git a/drivers/gpu/drm/i915/selftests/i915_perf.c b/drivers/gpu/drm/i915/selftests/i915_perf.c
> index 0aa151501fb3..c232194c60a2 100644
> --- a/drivers/gpu/drm/i915/selftests/i915_perf.c
> +++ b/drivers/gpu/drm/i915/selftests/i915_perf.c
> @@ -358,6 +358,7 @@ static int live_noa_gpr(void *arg)
>   		cs = intel_ring_begin(rq, 4);
>   		if (IS_ERR(cs)) {
>   			i915_request_add(rq);
> +			err = PTR_ERR(cs);
>   			goto out_rq;
>   		}
>   

Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Chris Wilson July 14, 2020, 5:15 p.m. UTC | #2
Quoting Lionel Landwerlin (2020-07-14 15:39:21)
> On 14/07/2020 17:36, Dan Carpenter wrote:
> > The error code needs to be set on this path.  It currently returns
> > success.
> >
> > Fixes: ed2690a9ca89 ("drm/i915/selftest: Check that GPR are restored across noa_wait")
> > Reported-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
> > Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
> > ---
> > v2: Fix a different bug instead.  :P  Colin fixed mine already.

I was thinking that Colin already sent the patch for this one...

> >
> >   drivers/gpu/drm/i915/selftests/i915_perf.c | 1 +
> >   1 file changed, 1 insertion(+)
> >
> > diff --git a/drivers/gpu/drm/i915/selftests/i915_perf.c b/drivers/gpu/drm/i915/selftests/i915_perf.c
> > index 0aa151501fb3..c232194c60a2 100644
> > --- a/drivers/gpu/drm/i915/selftests/i915_perf.c
> > +++ b/drivers/gpu/drm/i915/selftests/i915_perf.c
> > @@ -358,6 +358,7 @@ static int live_noa_gpr(void *arg)
> >               cs = intel_ring_begin(rq, 4);
> >               if (IS_ERR(cs)) {
> >                       i915_request_add(rq);
> > +                     err = PTR_ERR(cs);
> >                       goto out_rq;
> >               }
> >   
> 
> Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>

Ta,
-Chris
Dan Carpenter July 14, 2020, 6:08 p.m. UTC | #3
On Tue, Jul 14, 2020 at 06:15:22PM +0100, Chris Wilson wrote:
> Quoting Lionel Landwerlin (2020-07-14 15:39:21)
> > On 14/07/2020 17:36, Dan Carpenter wrote:
> > > The error code needs to be set on this path.  It currently returns
> > > success.
> > >
> > > Fixes: ed2690a9ca89 ("drm/i915/selftest: Check that GPR are restored across noa_wait")
> > > Reported-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
> > > Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
> > > ---
> > > v2: Fix a different bug instead.  :P  Colin fixed mine already.
> 
> I was thinking that Colin already sent the patch for this one...

Colin sent a fix for my v1 bug.  commit d2921096e707 ("drm/i915/selftest:
fix an error return path where err is not being set") but I don't think
he fixed this one.

regards,
dan carpenter
Colin King July 14, 2020, 6:12 p.m. UTC | #4
On 14/07/2020 19:08, Dan Carpenter wrote:
> On Tue, Jul 14, 2020 at 06:15:22PM +0100, Chris Wilson wrote:
>> Quoting Lionel Landwerlin (2020-07-14 15:39:21)
>>> On 14/07/2020 17:36, Dan Carpenter wrote:
>>>> The error code needs to be set on this path.  It currently returns
>>>> success.
>>>>
>>>> Fixes: ed2690a9ca89 ("drm/i915/selftest: Check that GPR are restored across noa_wait")
>>>> Reported-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
>>>> Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
>>>> ---
>>>> v2: Fix a different bug instead.  :P  Colin fixed mine already.
>>
>> I was thinking that Colin already sent the patch for this one...
> 
> Colin sent a fix for my v1 bug.  commit d2921096e707 ("drm/i915/selftest:
> fix an error return path where err is not being set") but I don't think
> he fixed this one.

Yep, coverity didn't pick the other issue up for some reason.

> 
> regards,
> dan carpenter
>
diff mbox series

Patch

diff --git a/drivers/gpu/drm/i915/selftests/i915_perf.c b/drivers/gpu/drm/i915/selftests/i915_perf.c
index 0aa151501fb3..c232194c60a2 100644
--- a/drivers/gpu/drm/i915/selftests/i915_perf.c
+++ b/drivers/gpu/drm/i915/selftests/i915_perf.c
@@ -358,6 +358,7 @@  static int live_noa_gpr(void *arg)
 		cs = intel_ring_begin(rq, 4);
 		if (IS_ERR(cs)) {
 			i915_request_add(rq);
+			err = PTR_ERR(cs);
 			goto out_rq;
 		}