UPSTREAM: USB: cdc-wdm: fix wdm_find_device* return value
authorBjørn Mork <bjorn@mork.no>
Mon, 10 Sep 2012 20:17:34 +0000 (22:17 +0200)
committerGerrit <chrome-bot@google.com>
Tue, 16 Oct 2012 21:11:10 +0000 (14:11 -0700)
commit40c5d5984a6c40b673cb890c7729702ce4753ce2
treec3ed970335e2d48b52f7e3c810bd56998235c97b
parentfa474726c1c18790390f0b3223501027bcd978a7
UPSTREAM: USB: cdc-wdm: fix wdm_find_device* return value

A logic error made the wdm_find_device* functions
return a bogus pointer into static data instead of
the intended NULL no matching device was found.

Cc: stable <stable@vger.kernel.org> # v3.4+
Cc: Oliver Neukum <oliver@neukum.org>
Signed-off-by: Bjørn Mork <bjorn@mork.no>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
(cherry picked from commit 6a44886899ef8cc396e230e492e6a56a883889f3)

Change-Id: I80f21db165d6f1791c7dd6bf0f02e6deb25b77b7
Signed-off-by: Ben Chan <benchan@chromium.org>
Reviewed-on: https://gerrit.chromium.org/gerrit/35160
Reviewed-by: Olof Johansson <olofj@chromium.org>
drivers/usb/class/cdc-wdm.c