[S390] cio: Make CIO_* macros safe if dbfs are not available.
authorCornelia Huck <cornelia.huck@de.ibm.com>
Fri, 27 Jul 2007 10:29:20 +0000 (12:29 +0200)
committerMartin Schwidefsky <schwidefsky@de.ibm.com>
Fri, 27 Jul 2007 10:29:20 +0000 (12:29 +0200)
Signed-off-by: Cornelia Huck <cornelia.huck@de.ibm.com>
Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
drivers/s390/cio/cio_debug.h

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