]> git.baikalelectronics.ru Git - kernel.git/commit
drm/amd/display: clean up a condition in dmub_psr_copy_settings()
authorDan Carpenter <dan.carpenter@oracle.com>
Thu, 12 Mar 2020 11:32:31 +0000 (14:32 +0300)
committerAlex Deucher <alexander.deucher@amd.com>
Fri, 13 Mar 2020 15:52:35 +0000 (11:52 -0400)
commit01fd8d502fc7560d280e1435c727135d536338ce
treea25a082de79f071c819c9a90787e22eefe2537fe
parentf94192e7d414212f2b9d0bf138021f3e6d6fd713
drm/amd/display: clean up a condition in dmub_psr_copy_settings()

We can remove the NULL check for "res_ctx" and
"res_ctx->pipe_ctx[i].stream->link".  Also it's nicer to align the
conditions using spaces so I re-indented a bit.

Longer explanation: The "res_ctx" pointer points to an address in the
middle of a struct so it can't be NULL.  For
"res_ctx->pipe_ctx[i].stream->link" we know that it is equal to "link"
and "link" is non-NULL.

Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
drivers/gpu/drm/amd/display/dc/dce/dmub_psr.c