From c2cea7b776f51ae933422e32e13f7802fac9fd7a Mon Sep 17 00:00:00 2001 From: Bart Van Assche Date: Wed, 2 May 2012 13:57:07 +0000 Subject: [PATCH] ib_srpt: Handle thread creation failure properly git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@4267 d57e44dd-8a1f-0410-8b47-8ef2f437770f --- srpt/src/ib_srpt.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/srpt/src/ib_srpt.c b/srpt/src/ib_srpt.c index e2a413408..d0ed455ef 100644 --- a/srpt/src/ib_srpt.c +++ b/srpt/src/ib_srpt.c @@ -2497,7 +2497,7 @@ static int srpt_cm_req_recv(struct ib_cm_id *cm_id, ch->sport->sdev->device->name); if (IS_ERR(thread)) { rej->reason = cpu_to_be32(SRP_LOGIN_REJ_INSUFFICIENT_RESOURCES); - ret = PTR_ERR(ch->thread); + ret = PTR_ERR(thread); PRINT_ERROR("failed to create kernel thread: %d", ret); goto unreg_ch; }