Ver Fonte

[S390] cio: Make CIO_* macros safe if dbfs are not available.

Signed-off-by: Cornelia Huck <cornelia.huck@de.ibm.com>
Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
Cornelia Huck há 18 anos atrás
pai
commit
303fa9e396
1 ficheiros alterados com 2 adições e 0 exclusões
  1. 2 0
      drivers/s390/cio/cio_debug.h

+ 2 - 0
drivers/s390/cio/cio_debug.h

@@ -23,6 +23,8 @@ extern debug_info_t *cio_debug_crw_id;
 static inline void
 static inline void
 CIO_HEX_EVENT(int level, void *data, int length)
 CIO_HEX_EVENT(int level, void *data, int length)
 {
 {
+	if (unlikely(!cio_debug_trace_id))
+		return;
 	while (length > 0) {
 	while (length > 0) {
 		debug_event(cio_debug_trace_id, level, data, length);
 		debug_event(cio_debug_trace_id, level, data, length);
 		length -= cio_debug_trace_id->buf_size;
 		length -= cio_debug_trace_id->buf_size;