greybus: raw: Don't use (possibly) uninitialized raw->device in gb_raw_receive()
authorViresh Kumar <viresh.kumar@linaro.org>
Fri, 12 Feb 2016 10:38:27 +0000 (16:08 +0530)
committerGreg Kroah-Hartman <gregkh@google.com>
Mon, 15 Feb 2016 22:51:20 +0000 (14:51 -0800)
commit2554eda5756a37118ab310bd02de78491303ab5f
tree687be3ed9dbdb5cefe86b5bd281ab3ed3525303a
parentc463593c3dbc8d4dcb132538b0116256fa0cc455
greybus: raw: Don't use (possibly) uninitialized raw->device in gb_raw_receive()

If an incoming request comes on the connection, before the driver has
allocated its raw->device in gb_raw_connection_init(), then it might
result in a crash while printing error messages.

Fix that by using bundle->dev for printing error messages.

Signed-off-by: Viresh Kumar <viresh.kumar@linaro.org>
Reviewed-by: Johan Hovold <johan@hovoldconsulting.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
drivers/staging/greybus/raw.c