s390/qeth: Allow reading hsuid in state DOWN
authorJulian Wiedmann <jwi@linux.vnet.ibm.com>
Thu, 12 Jan 2017 14:48:35 +0000 (15:48 +0100)
committerDavid S. Miller <davem@davemloft.net>
Thu, 12 Jan 2017 15:02:43 +0000 (10:02 -0500)
Accessing the current hsuid via card->options.hsuid is perfectly
fine, even when the card is DOWN.

Signed-off-by: Julian Wiedmann <jwi@linux.vnet.ibm.com>
Reviewed-by: Thomas Richter <tmricht@linux.vnet.ibm.com>
Acked-by: Ursula Braun <ubraun@linux.vnet.ibm.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/s390/net/qeth_l3_sys.c

index 0e00a5ce0f000f292ffe77584b031b97ba12f553..3cd4d9f7d5bdd03e3c1d1994972d81715e0c1cdd 100644 (file)
@@ -250,9 +250,6 @@ static ssize_t qeth_l3_dev_hsuid_show(struct device *dev,
        if (card->info.type != QETH_CARD_TYPE_IQD)
                return -EPERM;
 
-       if (card->state == CARD_STATE_DOWN)
-               return -EPERM;
-
        memcpy(tmp_hsuid, card->options.hsuid, sizeof(tmp_hsuid));
        EBCASC(tmp_hsuid, 8);
        return sprintf(buf, "%s\n", tmp_hsuid);