greybus: ignore a null cookie when canceling buffer
authorAlex Elder <elder@linaro.org>
Tue, 25 Nov 2014 22:54:03 +0000 (16:54 -0600)
committerGreg Kroah-Hartman <greg@kroah.com>
Tue, 25 Nov 2014 23:06:43 +0000 (15:06 -0800)
commitf34541d7e823bff1be8e0d497e01dcbaf9c65edb
tree8a0f9118c1f8e3bee8c7f05ac2e64973b39e5bd8
parent894cbc31360102fe51babdb82be69885f317843b
greybus: ignore a null cookie when canceling buffer

It's possible for an in-flight buffer to be recorded as sent *after*
a thread has begin the process of canceling it.  In that case the
Greybus message cookie will be set to NULL, and that value can end
up getting passed to buffer_cancel().  Change buffer_cancel() so
it properly handles (ignores) a null cookie pointer.

Signed-off-by: Alex Elder <elder@linaro.org>
Signed-off-by: Greg Kroah-Hartman <greg@kroah.com>
drivers/staging/greybus/es1-ap-usb.c