lkml.org 
[lkml]   [2018]   [Jul]   [20]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
From
Subject[PATCH 06/20] staging: gasket: don't treat no device reset callback as an error
Date
From: Todd Poynor <toddpoynor@google.com>

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>
---
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
\
 
 \ /
  Last update: 2018-07-20 05:52    [W:0.123 / U:1.096 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site