Skip to contentSkip to conversation

Patch "staging: greybus: add host device function pointer checks" has been added to the 4.9-stable tree

PATCH [email protected] 1 participant 1 message Nov 19, 2017

Subsystems (3)
lore
Share & tools
lore

[email protected]

author maintainer Applied
#0 lore raw

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 <[email protected]> know about it.

Quoted 1 line

From foo@baz Sun Nov 19 11:32:28 CET 2017

From: Jason Hrycay <[email protected]>
Date: Tue, 20 Dec 2016 14:49:27 -0600
Subject: staging: greybus: add host device function pointer checks

From: Jason Hrycay <[email protected]>

[ 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.

---
 drivers/staging/greybus/connection.c |    6 ++++++
 1 file changed, 6 insertions(+)
drivers/staging/greybus/connection.c +6 -0
@@ -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 [email protected] are

queue-4.9/staging-greybus-add-host-device-function-pointer-checks.patch