[bug report] drm/i915: switch from drm_debug_printer() to device specific drm_dbg_printer()

Dan Carpenter dan.carpenter at linaro.org
Mon Feb 19 09:10:53 UTC 2024


Hello Jani Nikula,

This is a semi-automatic email about new static checker warnings.

    drivers/gpu/drm/i915/gt/intel_engine_heartbeat.c:102 show_heartbeat()
    warn: variable dereferenced before check 'rq' (see line 99)

drivers/gpu/drm/i915/gt/intel_engine_heartbeat.c
    98	{
    99		struct drm_printer p = drm_dbg_printer(&rq->i915->drm, DRM_UT_DRIVER,
                                                       ^^^^^^^^^^^^^^
The patch adds an unchecked dereference

   100						       "heartbeat");
   101	
   102		if (!rq) {
                    ^^^
Previously we assumed "rq" could be NULL.

   103			intel_engine_dump(engine, &p,
   104					  "%s heartbeat not ticking\n",

regards,
dan carpenter


More information about the Intel-gfx mailing list