qeth: display service_level info only when valid.
authorKlaus-Dieter Wacker <kdwacker@de.ibm.com>
Wed, 26 Aug 2009 02:01:09 +0000 (02:01 +0000)
committerDavid S. Miller <davem@davemloft.net>
Thu, 27 Aug 2009 00:34:20 +0000 (17:34 -0700)
qeth displayed an entry in /proc/service_level even when no valid
MCL-string was available (the MCL info is blank). The change is to
create an entry in /proc/service_level only when MCL-string is
non-zero.

Signed-off-by: Klaus-Dieter Wacker <kdwacker@de.ibm.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/s390/net/qeth_core_main.c

index 1560bb621a3b384583084bad4e1dae98b1a2cd7f..c4a42d970158b62c6b96ebb044ee2fa777f70930 100644 (file)
@@ -1160,8 +1160,9 @@ static void qeth_core_sl_print(struct seq_file *m, struct service_level *slr)
 {
        struct qeth_card *card = container_of(slr, struct qeth_card,
                                        qeth_service_level);
-       seq_printf(m, "qeth: %s firmware level %s\n", CARD_BUS_ID(card),
-                       card->info.mcl_level);
+       if (card->info.mcl_level[0])
+               seq_printf(m, "qeth: %s firmware level %s\n",
+                       CARD_BUS_ID(card), card->info.mcl_level);
 }
 
 static struct qeth_card *qeth_alloc_card(void)