From: Ralph Wuerthner Date: Fri, 12 Oct 2007 14:11:29 +0000 (+0200) Subject: [S390] zcrypt: fix ap_reset_domain() X-Git-Tag: v2.6.24-rc1~1430 X-Git-Url: https://err.no/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=39aa7cf612cc4e7f688c18f04c35afb51c57472e;p=linux-2.6 [S390] zcrypt: fix ap_reset_domain() Resetting of a all queues within a domain requires that a domain must be selected first. Signed-off-by: Ralph Wuerthner Signed-off-by: Martin Schwidefsky --- diff --git a/drivers/s390/crypto/ap_bus.c b/drivers/s390/crypto/ap_bus.c index 90bd220145..d334b0f7a1 100644 --- a/drivers/s390/crypto/ap_bus.c +++ b/drivers/s390/crypto/ap_bus.c @@ -1231,8 +1231,9 @@ static void ap_reset_domain(void) { int i; - for (i = 0; i < AP_DEVICES; i++) - ap_reset_queue(AP_MKQID(i, ap_domain_index)); + if (ap_domain_index != -1) + for (i = 0; i < AP_DEVICES; i++) + ap_reset_queue(AP_MKQID(i, ap_domain_index)); } static void ap_reset_all(void)