Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

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 <efremov@linux.com>
Acked-by: Johan Hovold <johan@kernel.org>
Link: https://lore.kernel.org/r/20190925213656.8950-1-efremov@linux.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

authored by

Denis Efremov and committed by
Greg Kroah-Hartman
32a73870 bb4d6e0e

-3
-3
drivers/greybus/connection.c
··· 361 361 if (connection->mode_switch) 362 362 peer_space += sizeof(struct gb_operation_msg_hdr); 363 363 364 - if (!hd->driver->cport_quiesce) 365 - return 0; 366 - 367 364 ret = hd->driver->cport_quiesce(hd, connection->hd_cport_id, 368 365 peer_space, 369 366 GB_CONNECTION_CPORT_QUIESCE_TIMEOUT);