s390/qeth: Allow reading hsuid in state DOWN
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>
This commit is contained in:
parent
dae84c8e2a
commit
dadc08c7e0
|
@ -250,9 +250,6 @@ static ssize_t qeth_l3_dev_hsuid_show(struct device *dev,
|
||||||
if (card->info.type != QETH_CARD_TYPE_IQD)
|
if (card->info.type != QETH_CARD_TYPE_IQD)
|
||||||
return -EPERM;
|
return -EPERM;
|
||||||
|
|
||||||
if (card->state == CARD_STATE_DOWN)
|
|
||||||
return -EPERM;
|
|
||||||
|
|
||||||
memcpy(tmp_hsuid, card->options.hsuid, sizeof(tmp_hsuid));
|
memcpy(tmp_hsuid, card->options.hsuid, sizeof(tmp_hsuid));
|
||||||
EBCASC(tmp_hsuid, 8);
|
EBCASC(tmp_hsuid, 8);
|
||||||
return sprintf(buf, "%s\n", tmp_hsuid);
|
return sprintf(buf, "%s\n", tmp_hsuid);
|
||||||
|
|
Loading…
Reference in a new issue