wusb: fix find_first_zero_bit() return value check
authorAkinobu Mita <akinobu.mita@gmail.com>
Wed, 2 Mar 2011 11:35:28 +0000 (20:35 +0900)
committerGreg Kroah-Hartman <gregkh@suse.de>
Thu, 3 Mar 2011 00:52:28 +0000 (19:52 -0500)
In wusb_cluster_id_get(), if no zero bits exist in wusb_cluster_id_table,
find_first_zero_bit() returns CLUSTER_IDS.

But it is impossible to detect that the bitmap is full because there
is an off-by-one error in the return value check.  It will cause
unexpected memory access by setting bit out of wusb_cluster_id_table
bitmap, and caller will get wrong cluster id.

Signed-off-by: Akinobu Mita <akinobu.mita@gmail.com>
Cc: linux-usb@vger.kernel.org
Cc: Greg Kroah-Hartman <gregkh@suse.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>

No differences found