drivers/gpu/drm/drm_panic_helper.c:685 drm_panic_helper_get_qr_code() warn: unsigned '0' is never less than zero.

From: kernel test robot

Date: Thu Nov 05 2026 - 16:05:59 EST


tree: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head: 05441d697f7f9a927264f4058cbbc6a03dfcac9d
commit: 5c3d323984fd140108d527a920de8553ff6504b1 drm/panic: Move panic display code into helper library
date: 7 weeks ago
config: um-randconfig-2200-20261104 (https://download.01.org/0day-ci/archive/20261105/202611052207.nCXae3NM-lkp@xxxxxxxxx/config)
compiler: clang version 24.0.0git (https://github.com/llvm/llvm-project e2e3d6c39cfebec9eace23629a5a103df2c79ba6)
rustc: rustc 1.96.0 (ac68faa20 2026-05-25)
smatch: v0.5.0-9187-g5189e3fb

If you fix the issue in a separate patch/commit (i.e. not just a new version of
the same patch/commit), kindly add following tags
| Fixes: 5c3d323984fd ("drm/panic: Move panic display code into helper library")
| Reported-by: kernel test robot <lkp@xxxxxxxxx>
| Closes: https://lore.kernel.org/oe-kbuild-all/202611052207.nCXae3NM-lkp@xxxxxxxxx/

smatch warnings:
drivers/gpu/drm/drm_panic_helper.c:685 drm_panic_helper_get_qr_code() warn: unsigned '0' is never less than zero.

vim +/0 +685 drivers/gpu/drm/drm_panic_helper.c

682
683 static int drm_panic_helper_get_qr_code(u8 **qr_image, unsigned int qr_version)
684 {
> 685 if (strlen(CONFIG_DRM_PANIC_SCREEN_QR_CODE_URL) > 0)
686 return drm_panic_helper_get_qr_code_url(qr_image, qr_version);
687 else
688 return drm_panic_helper_get_qr_code_raw(qr_image, qr_version);
689 }
690

--
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki