Re: [PATCH 1/2] drm/amdgpu/debugfs: fix error code when smc register accessors are NULL

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Fri, Dec 8, 2023 at 8:24 AM Christian König
<ckoenig.leichtzumerken@xxxxxxxxx> wrote:
>
> The second patch never made it into my inbox, but the first one is
> Reviewed-by: Christian König <christian.koenig@xxxxxxx>.

Thanks.  Patch 2:
https://patchwork.freedesktop.org/patch/569132/

Alex

>
> Christian.
>
> Am 07.12.23 um 18:39 schrieb Alex Deucher:
> > Ping on this series?
> >
> > Alex
> >
> > On Mon, Nov 27, 2023 at 5:52 PM Alex Deucher <alexander.deucher@xxxxxxx> wrote:
> >> Should be -EOPNOTSUPP.
> >>
> >> Fixes: 5104fdf50d32 ("drm/amdgpu: Fix a null pointer access when the smc_rreg pointer is NULL")
> >> Signed-off-by: Alex Deucher <alexander.deucher@xxxxxxx>
> >> ---
> >>   drivers/gpu/drm/amd/amdgpu/amdgpu_debugfs.c | 4 ++--
> >>   1 file changed, 2 insertions(+), 2 deletions(-)
> >>
> >> diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_debugfs.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_debugfs.c
> >> index 0e61ebdb3f3e..8d4a3ff65c18 100644
> >> --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_debugfs.c
> >> +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_debugfs.c
> >> @@ -755,7 +755,7 @@ static ssize_t amdgpu_debugfs_regs_smc_read(struct file *f, char __user *buf,
> >>          int r;
> >>
> >>          if (!adev->smc_rreg)
> >> -               return -EPERM;
> >> +               return -EOPNOTSUPP;
> >>
> >>          if (size & 0x3 || *pos & 0x3)
> >>                  return -EINVAL;
> >> @@ -814,7 +814,7 @@ static ssize_t amdgpu_debugfs_regs_smc_write(struct file *f, const char __user *
> >>          int r;
> >>
> >>          if (!adev->smc_wreg)
> >> -               return -EPERM;
> >> +               return -EOPNOTSUPP;
> >>
> >>          if (size & 0x3 || *pos & 0x3)
> >>                  return -EINVAL;
> >> --
> >> 2.42.0
> >>
>




[Index of Archives]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux