]> git.proxmox.com Git - mirror_ubuntu-hirsute-kernel.git/commit
drm_dp_cec: check that aux has a transfer function
authorHans Verkuil <hans.verkuil@cisco.com>
Mon, 27 Aug 2018 07:58:16 +0000 (09:58 +0200)
committerHans Verkuil <hans.verkuil@cisco.com>
Fri, 31 Aug 2018 08:20:37 +0000 (10:20 +0200)
commit5ce70c799ac22c142061c71aaeae518f04283472
treeb818dcb56ef6b5945433178671c1a32e072e3478
parent09c4b49457434fa74749ad6194ef28464d9f5df9
drm_dp_cec: check that aux has a transfer function

If aux->transfer == NULL, then just return without doing
anything. In that case the function is likely called for
a non-(e)DP connector.

This never happened for the i915 driver, but the nouveau and amdgpu
drivers need this check.

The alternative would be to add this check in those drivers before
every drm_dp_cec call, but it makes sense to check it in the
drm_dp_cec functions to prevent a kernel oops.

Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Reviewed-by: Lyude Paul <lyude@redhat.com>
Acked-by: Alex Deucher <alexander.deucher@amd.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20180827075820.41109-2-hverkuil@xs4all.nl
drivers/gpu/drm/drm_dp_cec.c