drm/i915/hti: avoid theoretically possible negative shift
authorJani Nikula <jani.nikula@intel.com>
Tue, 22 Nov 2022 12:09:48 +0000 (14:09 +0200)
committerJani Nikula <jani.nikula@intel.com>
Wed, 23 Nov 2022 09:16:58 +0000 (11:16 +0200)
commitd1dd99083d187f64e5f4e507dcebf0d6228b901a
treec13381be314c20dac295b1f42b0aa5684f9a5372
parent67630bacae2354c3ae20b10cf25bc7e274882200
drm/i915/hti: avoid theoretically possible negative shift

If phy is PHY_NONE, the shift to register bits becomes negative. Check
and warn about this.

Reported-by: coverity-bot <keescook@chromium.org>
References: https://lore.kernel.org/r/202211180848.D39006C@keescook
Signed-off-by: Jani Nikula <jani.nikula@intel.com>
Reviewed-by: Kees Cook <keescook@chromium.org>
Link: https://patchwork.freedesktop.org/patch/msgid/20221122120948.3436180-1-jani.nikula@intel.com
drivers/gpu/drm/i915/display/intel_hti.c