]> git.baikalelectronics.ru Git - kernel.git/commit
drm/i915: Call i915_perf_fini() on init_hw error unwind
authorChris Wilson <chris@chris-wilson.co.uk>
Sat, 14 Apr 2018 09:12:33 +0000 (10:12 +0100)
committerChris Wilson <chris@chris-wilson.co.uk>
Sat, 14 Apr 2018 17:41:28 +0000 (18:41 +0100)
commit5e3997a0f25a69f3b09e948a3a491320ed87236b
tree175b2e7daf2ba3a34ed903bdb2f78d62c931c200
parenta767712c41be5f014cf99cc6924f9a77db71ac91
drm/i915: Call i915_perf_fini() on init_hw error unwind

We have to cleanup after i915_perf_init(), even on the error path, as it
passes a pointer into the module to the sysfs core. If we fail to
unregister the sysctl table, we leave a dangling pointer which then may
explode anytime later.

Fixes: 68c8e8fa9d9e ("drm/i915/perf: reuse timestamp frequency from device info")
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Cc: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Cc: Matthew Auld <matthew.auld@intel.com>
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Reviewed-by: Michal Wajdeczko <michal.wajdeczko@intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20180414091233.32224-1-chris@chris-wilson.co.uk
drivers/gpu/drm/i915/i915_drv.c