Merge tag 'linux-watchdog-6.1-rc4' of git://www.linux-watchdog.org/linux-watchdog
authorLinus Torvalds <torvalds@linux-foundation.org>
Tue, 1 Nov 2022 19:21:53 +0000 (12:21 -0700)
committerLinus Torvalds <torvalds@linux-foundation.org>
Tue, 1 Nov 2022 19:21:53 +0000 (12:21 -0700)
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

drivers/watchdog/exar_wdt.c
drivers/watchdog/sp805_wdt.c

index 35058d8b21bc71334822bd9491b0a9f327835a53..7c61ff3432711623aa4f6992f41c94f2664a5372 100644 (file)
@@ -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);
index 78ba36689eeca8ffd30d2ec00ba7dcb46ac7fefa..2756ed54ca3d55c2d4d25b9b9828101d73244e86 100644 (file)
@@ -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);