]> git.baikalelectronics.ru Git - kernel.git/commit
IB/ehca: fix handling idr_alloc result
authorAndrzej Hajda <a.hajda@samsung.com>
Mon, 21 Sep 2015 13:33:36 +0000 (15:33 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sun, 4 Oct 2015 18:50:05 +0000 (19:50 +0100)
commitb812addb41fb2e4765af9514114af45da7d77837
treefb8f06925406ac3a154a29678da57de752723260
parent583bc86d8dc36080c7c70f8fa82b9fa052d00241
IB/ehca: fix handling idr_alloc result

The function can return negative value.

The problem has been detected using proposed semantic patch
scripts/coccinelle/tests/unsigned_lesser_than_zero.cocci [1].

[1]: http://permalink.gmane.org/gmane.linux.kernel/2038576

Signed-off-by: Andrzej Hajda <a.hajda@samsung.com>
Acked-by: Doug Ledford <dledford@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/staging/rdma/ehca/ehca_cq.c