greybus: connection: prevent oops for protocol_id sysfs file
authorGreg Kroah-Hartman <gregkh@google.com>
Thu, 23 Jul 2015 01:21:04 +0000 (18:21 -0700)
committerGreg Kroah-Hartman <gregkh@google.com>
Thu, 23 Jul 2015 19:52:20 +0000 (12:52 -0700)
commit2975617421f843cac23eeb573a31d541f2aef9cf
treedd70a26447a33f43f9910c804c86bb88ac0b2651
parent155b9f175e2c4b36bf433a1b58e90319ea890de8
greybus: connection: prevent oops for protocol_id sysfs file

If we don't have a protocol assigned to a connection, don't oops when
trying to read the "protocol_id" sysfs file.

Fixes Jira SW-968.

Reported-by: Alexandre Bailon <abailon@baylibre.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
Reviewed-by: Viresh Kumar <viresh.kumar@linaro.org>
drivers/staging/greybus/connection.c