diff options
author | Todd Poynor <toddpoynor@google.com> | 2018-07-19 20:49:06 -0700 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2018-07-21 08:50:35 +0200 |
commit | ec45f01668e42f3dc3f18e11fa8655ad150ca250 (patch) | |
tree | 7484fbc541f763683c9ac04ddfb5b428181bacec /drivers/staging/gasket/gasket_core.c | |
parent | ed6e96c7951b85bb5c6a50503baa2fd9bfbb0510 (diff) |
staging: gasket: don't treat no device reset callback as an error
It is not an error for a device to not have a reset callback registered.
Signed-off-by: Simon Que <sque@chromium.org>
Signed-off-by: Todd Poynor <toddpoynor@google.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/staging/gasket/gasket_core.c')
-rw-r--r-- | drivers/staging/gasket/gasket_core.c | 7 |
1 files changed, 2 insertions, 5 deletions
diff --git a/drivers/staging/gasket/gasket_core.c b/drivers/staging/gasket/gasket_core.c index 53236e1ba4e4..eb5ad161ccda 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); |