Skip to content

Conversation

@ck-telecom
Copy link
Contributor

Fix watchdog driver return error

return -EINVAL;
}

data->timeout_valid = true;
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

is this ever set to false, or could be set if de-configured?

}

if (wdt_sf32lb_is_enabled(dev)) {
LOG_ERR("Watchdog already setup");
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
LOG_ERR("Watchdog already setup");
LOG_ERR("Setup not allowed with watchdog enabled");

Comment on lines 72 to 75
if (!wdt_sf32lb_is_enabled(dev)) {
return -EFAULT;
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

for consistency, log err?

struct wdt_sf32lb_data *data = dev->data;

if (wdt_sf32lb_is_enabled(dev)) {
LOG_ERR("Watchdog already setup");
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
LOG_ERR("Watchdog already setup");
LOG_ERR("Timeout install not allowed with watchdog enabled");

Fix watchdog driver return error

Signed-off-by: Qingsong Gou <gouqs@hotmail.com>
@sonarqubecloud
Copy link

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants