]> git.baikalelectronics.ru Git - kernel.git/commit
IB/srp: Test only once whether iu allocation succeeded
authorBart Van Assche <bvanassche@acm.org>
Thu, 13 Jan 2011 19:02:25 +0000 (19:02 +0000)
committerRoland Dreier <rolandd@cisco.com>
Thu, 13 Jan 2011 22:00:43 +0000 (14:00 -0800)
commit761e889718fcfbf32c8751b1637905696b65af7b
tree23c03ec4fc840d6df5c038fe7eb49e224123f081
parent004bda60330ca6df2546854d4653d209d02edc0f
IB/srp: Test only once whether iu allocation succeeded

Merge the two tests in srp_queuecommand() of whether information unit
allocation succeeded into one.  An intended side effect of this change
is that we fix the warning:

    drivers/infiniband/ulp/srp/ib_srp.c: In function 'srp_queuecommand':
    drivers/infiniband/ulp/srp/ib_srp.c:1116: warning: 'req' may be used uninitialized in this function

(seen with CONFIG_CC_OPTIMIZE_FOR_SIZE=y at least with gcc 4.4.4)

Signed-off-by: Bart Van Assche <bvanassche@acm.org>
Acked-by: David Dillow <dillowda@ornl.gov>
Signed-off-by: Roland Dreier <rolandd@cisco.com>
drivers/infiniband/ulp/srp/ib_srp.c