From: Denis Efremov Date: Wed, 25 Sep 2019 21:36:56 +0000 (+0300) Subject: greybus: remove excessive check in gb_connection_hd_cport_quiesce() X-Git-Tag: v5.5-rc1~136^2~96 X-Git-Url: https://asedeno.scripts.mit.edu/gitweb/?a=commitdiff_plain;h=32a738704d7fc20fcece0e14e4e44ec68689746f;p=linux.git 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: Denis Efremov Acked-by: Johan Hovold Link: https://lore.kernel.org/r/20190925213656.8950-1-efremov@linux.com Signed-off-by: Greg Kroah-Hartman --- diff --git a/drivers/greybus/connection.c b/drivers/greybus/connection.c index fc8f57f97ce6..e3799a53a193 100644 --- a/drivers/greybus/connection.c +++ b/drivers/greybus/connection.c @@ -361,9 +361,6 @@ static int gb_connection_hd_cport_quiesce(struct gb_connection *connection) if (connection->mode_switch) 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, peer_space, GB_CONNECTION_CPORT_QUIESCE_TIMEOUT);