drm/mgag200: Fix uninitialized variable delta
authorColin Ian King <colin.king@canonical.com>
Tue, 17 Aug 2021 16:32:04 +0000 (17:32 +0100)
committerThomas Zimmermann <tzimmermann@suse.de>
Wed, 18 Aug 2021 18:47:59 +0000 (20:47 +0200)
commitd03a493f6782b94b7002388d470cb583e061816a
tree0a244c1b6df720acb96bd73caa6f14ab9eba903a
parent17d3d3a6146c72c7b2e1aa97191bbefce167e0ad
drm/mgag200: Fix uninitialized variable delta

The variable delta is not initialized and this will cause unexpected
behaviour with the comparison of tmpdelta < delta. Fix this by setting
it to 0xffffffff. This matches the behaviour as in the similar function
mgag200_pixpll_compute_g200se_04.

v2:
* move fix up by one line to align style with other functions
* add additional tags from similar patch

Signed-off-by: Colin Ian King <colin.king@canonical.com>
Fixes: 2545ac960364 ("drm/mgag200: Abstract pixel PLL via struct mgag200_pll")
Addresses-Coverity: ("Uninitialized scalar variable")
Reviewed-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Reviewed-by: Thomas Zimmermann <tzimmermann@suse.de>
Reported-by: kernel test robot <lkp@intel.com>
Reported-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Thomas Zimmermann <tzimmermann@suse.de>
Cc: Sam Ravnborg <sam@ravnborg.org>
Cc: Dave Airlie <airlied@redhat.com>
Cc: dri-devel@lists.freedesktop.org
Link: https://patchwork.freedesktop.org/patch/msgid/20210817163204.494166-1-colin.king@canonical.com
drivers/gpu/drm/mgag200/mgag200_pll.c