Skip to content
Commit 3778724b authored by Markus Elfring's avatar Markus Elfring Committed by Karol Herbst
Browse files

drm/nouveau/debugfs: Move an expression into a function call parameter in...


drm/nouveau/debugfs: Move an expression into a function call parameter in nouveau_debugfs_pstate_set()

The address of a data structure member was determined before
a corresponding null pointer check in the implementation of
the function “nouveau_debugfs_pstate_set”.

Thus avoid the risk for undefined behaviour by moving the usage
of an expression into a parameter for a function call at the end.

This issue was detected by using the Coccinelle software.

Signed-off-by: default avatarMarkus Elfring <elfring@users.sourceforge.net>
Reviewed-by: default avatarKarol Herbst <kherbst@redhat.com>
Signed-off-by: default avatarKarol Herbst <kherbst@redhat.com>
Link: https://patchwork.freedesktop.org/patch/msgid/1903e057-57d3-e12e-da37-008e23afd2e2@web.de
parent 4f048de2
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment