diff options
| author | Linus Torvalds <torvalds@linux-foundation.org> | 2022-11-01 12:21:53 -0700 | 
|---|---|---|
| committer | Linus Torvalds <torvalds@linux-foundation.org> | 2022-11-01 12:21:53 -0700 | 
| commit | d79dcde0bc413efd35dd7eabe2d5eed34ec6deb0 (patch) | |
| tree | 9fc5eaa81986ac52096105b0655908915a7f8798 | |
| parent | 5aaef24b5c6d4246b2cac1be949869fa36577737 (diff) | |
| parent | 82ebbe65d781064cfb0a6a8af221a9cebcaaac9e (diff) | |
Merge tag 'linux-watchdog-6.1-rc4' of git://www.linux-watchdog.org/linux-watchdog
Pull watchdog fixes from Wim Van Sebroeck:
 - fix use after free in exar driver
 - spelling fix in comment
* tag 'linux-watchdog-6.1-rc4' of git://www.linux-watchdog.org/linux-watchdog:
  drivers: watchdog: exar_wdt.c fix use after free
  watchdog: sp805_wdt: fix spelling typo in comment
| -rw-r--r-- | drivers/watchdog/exar_wdt.c | 4 | ||||
| -rw-r--r-- | drivers/watchdog/sp805_wdt.c | 2 | 
2 files changed, 4 insertions, 2 deletions
| diff --git a/drivers/watchdog/exar_wdt.c b/drivers/watchdog/exar_wdt.c index 35058d8b21bc..7c61ff343271 100644 --- a/drivers/watchdog/exar_wdt.c +++ b/drivers/watchdog/exar_wdt.c @@ -355,8 +355,10 @@ static int __init exar_wdt_register(struct wdt_priv *priv, const int idx)  						    &priv->wdt_res, 1,  						    priv, sizeof(*priv));  	if (IS_ERR(n->pdev)) { +		int err = PTR_ERR(n->pdev); +  		kfree(n); -		return PTR_ERR(n->pdev); +		return err;  	}  	list_add_tail(&n->list, &pdev_list); diff --git a/drivers/watchdog/sp805_wdt.c b/drivers/watchdog/sp805_wdt.c index 78ba36689eec..2756ed54ca3d 100644 --- a/drivers/watchdog/sp805_wdt.c +++ b/drivers/watchdog/sp805_wdt.c @@ -88,7 +88,7 @@ static bool wdt_is_running(struct watchdog_device *wdd)  	return (wdtcontrol & ENABLE_MASK) == ENABLE_MASK;  } -/* This routine finds load value that will reset system in required timout */ +/* This routine finds load value that will reset system in required timeout */  static int wdt_setload(struct watchdog_device *wdd, unsigned int timeout)  {  	struct sp805_wdt *wdt = watchdog_get_drvdata(wdd); | 
