Commit 45042402 authored by Todd Poynor's avatar Todd Poynor Committed by Greg Kroah-Hartman

staging: gasket: bail out of reset sequence on device callback error

If device reset callback returns an error, error out at the gasket
level.
Reported-by: default avatarDmitry Torokhov <dtor@chromium.org>
Signed-off-by: default avatarZhongze Hu <frankhu@chromium.org>
Signed-off-by: default avatarTodd Poynor <toddpoynor@google.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent 72a23054
......@@ -1875,9 +1875,11 @@ int gasket_reset_nolock(struct gasket_dev *gasket_dev, uint reset_type)
/* Perform a device reset of the requested type. */
ret = driver_desc->device_reset_cb(gasket_dev, reset_type);
if (ret)
if (ret) {
gasket_log_error(
gasket_dev, "Device reset cb returned %d.", ret);
return ret;
}
/* Reinitialize the page tables and interrupt framework. */
for (i = 0; i < driver_desc->num_page_tables; ++i)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment