[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20180720034920.77320-7-toddpoynor@gmail.com>
Date: Thu, 19 Jul 2018 20:49:06 -0700
From: Todd Poynor <toddpoynor@...il.com>
To: Rob Springer <rspringer@...gle.com>,
John Joseph <jnjoseph@...gle.com>,
Ben Chan <benchan@...omium.org>,
Greg Kroah-Hartman <gregkh@...uxfoundation.org>
Cc: Zhongze Hu <frankhu@...omium.org>, Simon Que <sque@...omium.org>,
Dmitry Torokhov <dtor@...omium.org>,
Guenter Roeck <groeck@...omium.org>,
devel@...verdev.osuosl.org, linux-kernel@...r.kernel.org,
Todd Poynor <toddpoynor@...gle.com>
Subject: [PATCH 06/20] staging: gasket: don't treat no device reset callback as an error
From: Todd Poynor <toddpoynor@...gle.com>
It is not an error for a device to not have a reset callback registered.
Signed-off-by: Simon Que <sque@...omium.org>
Signed-off-by: Todd Poynor <toddpoynor@...gle.com>
---
drivers/staging/gasket/gasket_core.c | 7 ++-----
1 file changed, 2 insertions(+), 5 deletions(-)
diff --git a/drivers/staging/gasket/gasket_core.c b/drivers/staging/gasket/gasket_core.c
index 53236e1ba4e48..eb5ad161ccda2 100644
--- a/drivers/staging/gasket/gasket_core.c
+++ b/drivers/staging/gasket/gasket_core.c
@@ -1836,11 +1836,8 @@ int gasket_reset_nolock(struct gasket_dev *gasket_dev, uint reset_type)
const struct gasket_driver_desc *driver_desc;
driver_desc = gasket_dev->internal_desc->driver_desc;
- if (!driver_desc->device_reset_cb) {
- gasket_log_error(
- gasket_dev, "No device reset callback was registered.");
- return -EINVAL;
- }
+ if (!driver_desc->device_reset_cb)
+ return 0;
/* Perform a device reset of the requested type. */
ret = driver_desc->device_reset_cb(gasket_dev, reset_type);
--
2.18.0.233.g985f88cf7e-goog
Powered by blists - more mailing lists