From b0075d14a9360d27a519871196c503d922afb188 Mon Sep 17 00:00:00 2001 From: Tejun Heo Date: Wed, 27 Feb 2013 17:04:41 -0800 Subject: [PATCH] --- yaml --- r: 359363 b: refs/heads/master c: 70a9755d5fe71d9ecf3010c5c345449378fb0898 h: refs/heads/master i: 359361: eadaedcf5cebe47096128a60c50460a6a434889b 359359: 5a164151fe7345708e6ebd8ecb4d919c16ed4e43 v: v3 --- [refs] | 2 +- trunk/drivers/scsi/bfa/bfad_im.c | 15 ++++----------- 2 files changed, 5 insertions(+), 12 deletions(-) diff --git a/[refs] b/[refs] index 9b2e7f9f7502..51063bc790d4 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: d0ffce779d667ec0684309797c187846cedab6d4 +refs/heads/master: 70a9755d5fe71d9ecf3010c5c345449378fb0898 diff --git a/trunk/drivers/scsi/bfa/bfad_im.c b/trunk/drivers/scsi/bfa/bfad_im.c index 8f92732655c7..5864f987f206 100644 --- a/trunk/drivers/scsi/bfa/bfad_im.c +++ b/trunk/drivers/scsi/bfa/bfad_im.c @@ -523,20 +523,13 @@ bfad_im_scsi_host_alloc(struct bfad_s *bfad, struct bfad_im_port_s *im_port, int error = 1; mutex_lock(&bfad_mutex); - if (!idr_pre_get(&bfad_im_port_index, GFP_KERNEL)) { + error = idr_alloc(&bfad_im_port_index, im_port, 0, 0, GFP_KERNEL); + if (error < 0) { mutex_unlock(&bfad_mutex); - printk(KERN_WARNING "idr_pre_get failure\n"); + printk(KERN_WARNING "idr_alloc failure\n"); goto out; } - - error = idr_get_new(&bfad_im_port_index, im_port, - &im_port->idr_id); - if (error) { - mutex_unlock(&bfad_mutex); - printk(KERN_WARNING "idr_get_new failure\n"); - goto out; - } - + im_port->idr_id = error; mutex_unlock(&bfad_mutex); im_port->shost = bfad_scsi_host_alloc(im_port, bfad);