From 8fc7c30588f9ddebd1e97c39a389846f786ab7b2 Mon Sep 17 00:00:00 2001 From: jsg Date: Mon, 29 Jan 2024 01:39:33 +0000 Subject: [PATCH] drm/amdgpu/debugfs: fix error code when smc register accessors are NULL From Alex Deucher 5bc4f16118c575410e7be220bbb9b1fa2ee4274b in linux-6.6.y/6.6.14 afe58346d5d3887b3e49ff623d2f2e471f232a8d in mainline linux --- sys/dev/pci/drm/amd/amdgpu/amdgpu_debugfs.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/sys/dev/pci/drm/amd/amdgpu/amdgpu_debugfs.c b/sys/dev/pci/drm/amd/amdgpu/amdgpu_debugfs.c index 3f2126f9992..418ff7cd662 100644 --- a/sys/dev/pci/drm/amd/amdgpu/amdgpu_debugfs.c +++ b/sys/dev/pci/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.20.1