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:
parent
ed6e96c795
commit
ec45f01668
|
@ -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);
|
||||
|
|
Loading…
Reference in New Issue