greybus: sdio: fix work-queue leak and use-after-free
authorJohan Hovold <johan@hovoldconsulting.com>
Mon, 14 Sep 2015 18:19:04 +0000 (20:19 +0200)
committerGreg Kroah-Hartman <gregkh@google.com>
Tue, 15 Sep 2015 04:57:25 +0000 (21:57 -0700)
commitb9154df5cfd2d4cc180f425f0b26e095ce1ffdbc
tree6fc4c03faa2710fe0ab2c300aad7f326573cdda7
parente5265266ec6360702feb6ff69d1aec9e318ae1f6
greybus: sdio: fix work-queue leak and use-after-free

A single global work-queue pointer was used for the per-connection
workqueue, something which would lead to memory leaks and all sorts of
bad things if there are ever more than one SDIO connection in a system.

Also add the missing error handling when allocating the queue.

Signed-off-by: Johan Hovold <johan@hovoldconsulting.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
drivers/staging/greybus/sdio.c