Commit 32a73870 authored by Denis Efremov's avatar Denis Efremov Committed by Greg Kroah-Hartman

greybus: remove excessive check in gb_connection_hd_cport_quiesce()

Function pointer "hd->driver->cport_quiesce" is already checked
at the beginning of gb_connection_hd_cport_quiesce(). Thus, the
second check can be removed.
Signed-off-by: default avatarDenis Efremov <efremov@linux.com>
Acked-by: default avatarJohan Hovold <johan@kernel.org>
Link: https://lore.kernel.org/r/20190925213656.8950-1-efremov@linux.comSigned-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent bb4d6e0e
...@@ -361,9 +361,6 @@ static int gb_connection_hd_cport_quiesce(struct gb_connection *connection) ...@@ -361,9 +361,6 @@ static int gb_connection_hd_cport_quiesce(struct gb_connection *connection)
if (connection->mode_switch) if (connection->mode_switch)
peer_space += sizeof(struct gb_operation_msg_hdr); peer_space += sizeof(struct gb_operation_msg_hdr);
if (!hd->driver->cport_quiesce)
return 0;
ret = hd->driver->cport_quiesce(hd, connection->hd_cport_id, ret = hd->driver->cport_quiesce(hd, connection->hd_cport_id,
peer_space, peer_space,
GB_CONNECTION_CPORT_QUIESCE_TIMEOUT); GB_CONNECTION_CPORT_QUIESCE_TIMEOUT);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment