Make sure to fail properly when a protocol is missing.
This prevents the connection from being created, which is fine as we
currently never bind protocols post creation.
This is an intermediate step in moving protocol binding to
connection_init.
Signed-off-by: Johan Hovold <johan@hovoldconsulting.com>
Reviewed-by: Viresh Kumar <viresh.kumar@linaro.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
connection->major,
connection->minor);
if (!protocol) {
- dev_warn(&connection->hd->dev,
+ dev_err(&connection->hd->dev,
"protocol 0x%02x version %u.%u not found\n",
connection->protocol_id,
connection->major, connection->minor);
- return 0;
+ return -EPROTONOSUPPORT;
}
connection->protocol = protocol;