Skip to content

Commit 7519033

Browse files
committed
firewire: core: use WARN_ON_ONCE() to avoid superfluous dumps
It is enough to notify programming mistakes to programmers just once. Suggested-by: Takashi Iwai <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Takashi Sakamoto <[email protected]>
1 parent 5c49cc0 commit 7519033

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

drivers/firewire/core-iso.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -220,7 +220,7 @@ int fw_iso_context_flush_completions(struct fw_iso_context *ctx)
220220
might_sleep();
221221

222222
// Avoid dead lock due to programming mistake.
223-
if (WARN_ON(current_work() == &ctx->work))
223+
if (WARN_ON_ONCE(current_work() == &ctx->work))
224224
return 0;
225225

226226
disable_work_sync(&ctx->work);
@@ -244,7 +244,7 @@ int fw_iso_context_stop(struct fw_iso_context *ctx)
244244
might_sleep();
245245

246246
// Avoid dead lock due to programming mistake.
247-
if (WARN_ON(current_work() == &ctx->work))
247+
if (WARN_ON_ONCE(current_work() == &ctx->work))
248248
return 0;
249249

250250
err = ctx->card->driver->stop_iso(ctx);

0 commit comments

Comments
 (0)