]> git.baikalelectronics.ru Git - kernel.git/commit
rdma: fix buggy code that the compiler warns about
authorLinus Torvalds <torvalds@linux-foundation.org>
Thu, 15 Dec 2016 20:18:42 +0000 (12:18 -0800)
committerLinus Torvalds <torvalds@linux-foundation.org>
Thu, 15 Dec 2016 20:18:42 +0000 (12:18 -0800)
commit2d6a117a1ecec2782edb215e59f684ce7229a936
tree01d093ed7c8e6976b6c4150a97c0a02a41b2ff33
parent561b253c3bda12da6cb5719614124cb4cc713948
rdma: fix buggy code that the compiler warns about

Get rid of this warning:

  drivers/infiniband/sw/rdmavt/cq.c: In function ‘rvt_cq_exit’:
  drivers/infiniband/sw/rdmavt/cq.c:542:2: warning: ‘worker’ may be used uninitialized in this function [-Wmaybe-uninitialized]
    kthread_destroy_worker(worker);
    ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

by fixing the function to actually work.

Fixes: 0b2d74aa1028 ("IB/rdmavt: Avoid queuing work into a destroyed cq kthread worker")
Cc: Petr Mladek <pmladek@suse.com>
Cc: Doug Ledford <dledford@redhat.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
drivers/infiniband/sw/rdmavt/cq.c