Skip to content

Commit

Permalink
drm/i915/perf: replace BUG_ON() with WARN_ON()
Browse files Browse the repository at this point in the history
Avoid BUG_ON(). Replace with WARN_ON() and early return.

Reviewed-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
Signed-off-by: Jani Nikula <jani.nikula@intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20220830093411.1511040-4-jani.nikula@intel.com
  • Loading branch information
Jani Nikula committed Aug 31, 2022
1 parent 8482af4 commit 6f10c4d
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion drivers/gpu/drm/i915/i915_perf.c
Original file line number Diff line number Diff line change
Expand Up @@ -1376,7 +1376,8 @@ static void i915_oa_stream_destroy(struct i915_perf_stream *stream)
{
struct i915_perf *perf = stream->perf;

BUG_ON(stream != perf->exclusive_stream);
if (WARN_ON(stream != perf->exclusive_stream))
return;

/*
* Unset exclusive_stream first, it will be checked while disabling
Expand Down

0 comments on commit 6f10c4d

Please sign in to comment.