aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/s390/block/scm_blk.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/s390/block/scm_blk.c')
-rw-r--r--drivers/s390/block/scm_blk.c11
1 files changed, 7 insertions, 4 deletions
diff --git a/drivers/s390/block/scm_blk.c b/drivers/s390/block/scm_blk.c
index 5ac9c935c151..e9b9c8392832 100644
--- a/drivers/s390/block/scm_blk.c
+++ b/drivers/s390/block/scm_blk.c
@@ -307,7 +307,7 @@ static void scm_blk_handle_error(struct scm_request *scmrq)
307 case EQC_WR_PROHIBIT: 307 case EQC_WR_PROHIBIT:
308 spin_lock_irqsave(&bdev->lock, flags); 308 spin_lock_irqsave(&bdev->lock, flags);
309 if (bdev->state != SCM_WR_PROHIBIT) 309 if (bdev->state != SCM_WR_PROHIBIT)
310 pr_info("%lu: Write access to the SCM increment is suspended\n", 310 pr_info("%lx: Write access to the SCM increment is suspended\n",
311 (unsigned long) bdev->scmdev->address); 311 (unsigned long) bdev->scmdev->address);
312 bdev->state = SCM_WR_PROHIBIT; 312 bdev->state = SCM_WR_PROHIBIT;
313 spin_unlock_irqrestore(&bdev->lock, flags); 313 spin_unlock_irqrestore(&bdev->lock, flags);
@@ -445,7 +445,7 @@ void scm_blk_set_available(struct scm_blk_dev *bdev)
445 445
446 spin_lock_irqsave(&bdev->lock, flags); 446 spin_lock_irqsave(&bdev->lock, flags);
447 if (bdev->state == SCM_WR_PROHIBIT) 447 if (bdev->state == SCM_WR_PROHIBIT)
448 pr_info("%lu: Write access to the SCM increment is restored\n", 448 pr_info("%lx: Write access to the SCM increment is restored\n",
449 (unsigned long) bdev->scmdev->address); 449 (unsigned long) bdev->scmdev->address);
450 bdev->state = SCM_OPER; 450 bdev->state = SCM_OPER;
451 spin_unlock_irqrestore(&bdev->lock, flags); 451 spin_unlock_irqrestore(&bdev->lock, flags);
@@ -463,12 +463,15 @@ static int __init scm_blk_init(void)
463 goto out; 463 goto out;
464 464
465 scm_major = ret; 465 scm_major = ret;
466 if (scm_alloc_rqs(nr_requests)) 466 ret = scm_alloc_rqs(nr_requests);
467 if (ret)
467 goto out_unreg; 468 goto out_unreg;
468 469
469 scm_debug = debug_register("scm_log", 16, 1, 16); 470 scm_debug = debug_register("scm_log", 16, 1, 16);
470 if (!scm_debug) 471 if (!scm_debug) {
472 ret = -ENOMEM;
471 goto out_free; 473 goto out_free;
474 }
472 475
473 debug_register_view(scm_debug, &debug_hex_ascii_view); 476 debug_register_view(scm_debug, &debug_hex_ascii_view);
474 debug_set_level(scm_debug, 2); 477 debug_set_level(scm_debug, 2);