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>
This commit is contained in:
Todd Poynor 2018-07-19 20:49:06 -07:00 committed by Greg Kroah-Hartman
parent ed6e96c795
commit ec45f01668
1 changed files with 2 additions and 5 deletions

View File

@ -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);