artulab
projects
/
openbsd
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
e9e40a7
)
drm/amd/display: fix a NULL pointer dereference in amdgpu_dm_i2c_xfer()
author
jsg
<jsg@openbsd.org>
Thu, 30 Nov 2023 02:57:53 +0000
(
02:57
+0000)
committer
jsg
<jsg@openbsd.org>
Thu, 30 Nov 2023 02:57:53 +0000
(
02:57
+0000)
From Mario Limonciello
fb5c134ca589fe670430acc9e7ebf2691ca2476d
in linux-6.1.y/6.1.64
b71f4ade1b8900d30c661d6c27f87c35214c398c
in mainline linux
sys/dev/pci/drm/amd/display/amdgpu_dm/amdgpu_dm.c
patch
|
blob
|
history
diff --git
a/sys/dev/pci/drm/amd/display/amdgpu_dm/amdgpu_dm.c
b/sys/dev/pci/drm/amd/display/amdgpu_dm/amdgpu_dm.c
index
64a9b95
..
09815d3
100644
(file)
--- a/
sys/dev/pci/drm/amd/display/amdgpu_dm/amdgpu_dm.c
+++ b/
sys/dev/pci/drm/amd/display/amdgpu_dm/amdgpu_dm.c
@@
-7221,6
+7221,9
@@
static int amdgpu_dm_i2c_xfer(struct i2c_adapter *i2c_adap,
int i;
int result = -EIO;
+ if (!ddc_service->ddc_pin || !ddc_service->ddc_pin->hw_info.hw_supported)
+ return result;
+
cmd.payloads = kcalloc(num, sizeof(struct i2c_payload), GFP_KERNEL);
if (!cmd.payloads)