From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail.linuxfoundation.org ([140.211.169.12]:41916 "EHLO mail.linuxfoundation.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751059AbdKSKfQ (ORCPT ); Sun, 19 Nov 2017 05:35:16 -0500 Subject: Patch "staging: greybus: add host device function pointer checks" has been added to the 4.9-stable tree To: jhrycay@gmail.com, alexander.levin@verizon.com, gregkh@linuxfoundation.org, johan@kernel.org, pure.logic@nexus-software.ie Cc: , From: Date: Sun, 19 Nov 2017 11:33:25 +0100 Message-ID: <151108760521126@kroah.com> MIME-Version: 1.0 Content-Type: text/plain; charset=ANSI_X3.4-1968 Content-Transfer-Encoding: 8bit Sender: stable-owner@vger.kernel.org List-ID: This is a note to let you know that I've just added the patch titled staging: greybus: add host device function pointer checks to the 4.9-stable tree which can be found at: http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary The filename of the patch is: staging-greybus-add-host-device-function-pointer-checks.patch and it can be found in the queue-4.9 subdirectory. If you, or anyone else, feels it should not be added to the stable tree, please let know about it. >>From foo@baz Sun Nov 19 11:32:28 CET 2017 From: Jason Hrycay Date: Tue, 20 Dec 2016 14:49:27 -0600 Subject: staging: greybus: add host device function pointer checks From: Jason Hrycay [ Upstream commit f05a88a39c5b5f226e08e626998bb920723b7d85 ] Add sanity checks for cport_quiesce and cport_clear before invoking the callbacks as these function pointers are not required during the host device registration. This follows the logic implemented elsewhere for various other function pointers. Signed-off-by: Jason Hrycay Reviewed-by: Bryan O'Donoghue Acked-by: Johan Hovold Signed-off-by: Greg Kroah-Hartman Signed-off-by: Sasha Levin Signed-off-by: Greg Kroah-Hartman --- drivers/staging/greybus/connection.c | 6 ++++++ 1 file changed, 6 insertions(+) --- a/drivers/staging/greybus/connection.c +++ b/drivers/staging/greybus/connection.c @@ -357,6 +357,9 @@ static int gb_connection_hd_cport_quiesc size_t peer_space; int ret; + if (!hd->driver->cport_quiesce) + return 0; + peer_space = sizeof(struct gb_operation_msg_hdr) + sizeof(struct gb_cport_shutdown_request); @@ -380,6 +383,9 @@ static int gb_connection_hd_cport_clear( struct gb_host_device *hd = connection->hd; int ret; + if (!hd->driver->cport_clear) + return 0; + ret = hd->driver->cport_clear(hd, connection->hd_cport_id); if (ret) { dev_err(&hd->dev, "%s: failed to clear host cport: %d\n", Patches currently in stable-queue which might be from jhrycay@gmail.com are queue-4.9/staging-greybus-add-host-device-function-pointer-checks.patch