Skip to content

Commit 60ed286

Browse files
zonquetiwai
authored andcommitted
ALSA: usb-audio: make hwc_debug a noop in case HW_CONST_DEBUG is not set
Just defining it to nothing is dangerous as it can alter the code execution flow, for example when used in as only function in a conditional code block. Signed-off-by: Daniel Mack <zonque@gmail.com> Signed-off-by: Takashi Iwai <tiwai@suse.de>
1 parent 23dc05a commit 60ed286

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

‎sound/usb/debug.h‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
#ifdef HW_CONST_DEBUG
99
#define hwc_debug(fmt, args...) printk(KERN_DEBUG fmt, ##args)
1010
#else
11-
#define hwc_debug(fmt, args...) /**/
11+
#define hwc_debug(fmt, args...) do { } while(0)
1212
#endif
1313

1414
#endif /* __USBAUDIO_DEBUG_H */

0 commit comments

Comments
 (0)