Commit 80030425 authored by Wolfram Sang's avatar Wolfram Sang Committed by Wim Van Sebroeck

watchdog: make watchdog_deferred_registration_add() void

It cannot fail, so no return value needed.
Signed-off-by: default avatarWolfram Sang <wsa+renesas@sang-engineering.com>
Signed-off-by: default avatarGuenter Roeck <linux@roeck-us.net>
Signed-off-by: default avatarWim Van Sebroeck <wim@linux-watchdog.org>
parent 46713c3d
...@@ -60,11 +60,10 @@ static DEFINE_MUTEX(wtd_deferred_reg_mutex); ...@@ -60,11 +60,10 @@ static DEFINE_MUTEX(wtd_deferred_reg_mutex);
static LIST_HEAD(wtd_deferred_reg_list); static LIST_HEAD(wtd_deferred_reg_list);
static bool wtd_deferred_reg_done; static bool wtd_deferred_reg_done;
static int watchdog_deferred_registration_add(struct watchdog_device *wdd) static void watchdog_deferred_registration_add(struct watchdog_device *wdd)
{ {
list_add_tail(&wdd->deferred, list_add_tail(&wdd->deferred,
&wtd_deferred_reg_list); &wtd_deferred_reg_list);
return 0;
} }
static void watchdog_deferred_registration_del(struct watchdog_device *wdd) static void watchdog_deferred_registration_del(struct watchdog_device *wdd)
...@@ -265,13 +264,13 @@ static int __watchdog_register_device(struct watchdog_device *wdd) ...@@ -265,13 +264,13 @@ static int __watchdog_register_device(struct watchdog_device *wdd)
int watchdog_register_device(struct watchdog_device *wdd) int watchdog_register_device(struct watchdog_device *wdd)
{ {
int ret; int ret = 0;
mutex_lock(&wtd_deferred_reg_mutex); mutex_lock(&wtd_deferred_reg_mutex);
if (wtd_deferred_reg_done) if (wtd_deferred_reg_done)
ret = __watchdog_register_device(wdd); ret = __watchdog_register_device(wdd);
else else
ret = watchdog_deferred_registration_add(wdd); watchdog_deferred_registration_add(wdd);
mutex_unlock(&wtd_deferred_reg_mutex); mutex_unlock(&wtd_deferred_reg_mutex);
return ret; return ret;
} }
......
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