[bug report] drm/amdgpu/acpi: unify ATCS handling (v3)

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hello Alex Deucher,

The patch 77bf762f8b30: "drm/amdgpu/acpi: unify ATCS handling (v3)"
from May 19, 2021, leads to the following static checker warning:

	drivers/gpu/drm/amd/amdgpu/amdgpu_acpi.c:857 amdgpu_acpi_init()
	warn: this array is probably non-NULL. 'dm->backlight_dev'

drivers/gpu/drm/amd/amdgpu/amdgpu_acpi.c
   848  int amdgpu_acpi_init(struct amdgpu_device *adev)
   849  {
   850          struct amdgpu_atif *atif = &amdgpu_acpi_priv.atif;
   851  
   852  #if defined(CONFIG_BACKLIGHT_CLASS_DEVICE) || defined(CONFIG_BACKLIGHT_CLASS_DEVICE_MODULE)
   853          if (atif->notifications.brightness_change) {
   854                  if (amdgpu_device_has_dc_support(adev)) {
   855  #if defined(CONFIG_DRM_AMD_DC)
   856                          struct amdgpu_display_manager *dm = &adev->dm;
   857                          if (dm->backlight_dev)
                                    ^^^^^^^^^^^^^^^^^
The commit adds an unnecessary NULL check.

   858                                  atif->bd = dm->backlight_dev[0];
   859  #endif
   860                  } else {
   861                          struct drm_encoder *tmp;

regards,
dan carpenter
_______________________________________________
amd-gfx mailing list
amd-gfx@xxxxxxxxxxxxxxxxxxxxx
https://lists.freedesktop.org/mailman/listinfo/amd-gfx



[Index of Archives]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux