drm/i915: do not return invalid pointers as a *dentry
authorGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 31 Jan 2019 13:15:07 +0000 (14:15 +0100)
committerRodrigo Vivi <rodrigo.vivi@intel.com>
Tue, 5 Feb 2019 17:45:28 +0000 (09:45 -0800)
commitab1ab0eb0cb64d1c225bdf42bee067f81c87e2a4
tree30225b82275a21af2102858a1e61ed23767f1190
parentb2ae318acdcaf1c9562329c9cc1bd2f479157ad2
drm/i915: do not return invalid pointers as a *dentry

When calling debugfs functions, they can now return error values if
something went wrong.  If that happens, return a NULL as a *dentry to
the relay core instead of passing it an illegal pointer.

The relay core should be able to handle an illegal pointer, but add this
check to be safe.

Cc: Jani Nikula <jani.nikula@linux.intel.com>
Cc: Joonas Lahtinen <joonas.lahtinen@linux.intel.com>
Cc: Rodrigo Vivi <rodrigo.vivi@intel.com>
Cc: David Airlie <airlied@linux.ie>
Cc: Daniel Vetter <daniel@ffwll.ch>
Cc: intel-gfx@lists.freedesktop.org
Cc: dri-devel@lists.freedesktop.org
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Reviewed-by: Rodrigo Vivi <rodrigo.vivi@intel.com>
Signed-off-by: Rodrigo Vivi <rodrigo.vivi@intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20190131131507.GA19807@kroah.com
drivers/gpu/drm/i915/intel_guc_log.c