summaryrefslogtreecommitdiffstats
path: root/drivers/watchdog/diag288_wdt.c
diff options
context:
space:
mode:
authorGreg Kroah-Hartman <gregkh@linuxfoundation.org>2023-02-06 08:33:30 +0100
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2023-02-06 08:33:30 +0100
commit924fb3ec50f5156d21e4f484358fb36f75b91ca8 (patch)
treef36b768432fe7f7c07b28857533e1bfe16006abe /drivers/watchdog/diag288_wdt.c
parentusb: remove the dead USB_OHCI_SH option (diff)
parentLinux 6.2-rc7 (diff)
downloadlinux-924fb3ec50f5156d21e4f484358fb36f75b91ca8.tar.xz
linux-924fb3ec50f5156d21e4f484358fb36f75b91ca8.zip
Merge 6.2-rc7 into usb-next
We need the USB fixes in here, and this resolves a merge conflict with the i915 driver as reported in linux-next Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/watchdog/diag288_wdt.c')
-rw-r--r--drivers/watchdog/diag288_wdt.c15
1 files changed, 12 insertions, 3 deletions
diff --git a/drivers/watchdog/diag288_wdt.c b/drivers/watchdog/diag288_wdt.c
index 4cb10877017c..6ca5d9515d85 100644
--- a/drivers/watchdog/diag288_wdt.c
+++ b/drivers/watchdog/diag288_wdt.c
@@ -86,7 +86,7 @@ static int __diag288(unsigned int func, unsigned int timeout,
"1:\n"
EX_TABLE(0b, 1b)
: "+d" (err) : "d"(__func), "d"(__timeout),
- "d"(__action), "d"(__len) : "1", "cc");
+ "d"(__action), "d"(__len) : "1", "cc", "memory");
return err;
}
@@ -268,12 +268,21 @@ static int __init diag288_init(void)
char ebc_begin[] = {
194, 197, 199, 201, 213
};
+ char *ebc_cmd;
watchdog_set_nowayout(&wdt_dev, nowayout_info);
if (MACHINE_IS_VM) {
- if (__diag288_vm(WDT_FUNC_INIT, 15,
- ebc_begin, sizeof(ebc_begin)) != 0) {
+ ebc_cmd = kmalloc(sizeof(ebc_begin), GFP_KERNEL);
+ if (!ebc_cmd) {
+ pr_err("The watchdog cannot be initialized\n");
+ return -ENOMEM;
+ }
+ memcpy(ebc_cmd, ebc_begin, sizeof(ebc_begin));
+ ret = __diag288_vm(WDT_FUNC_INIT, 15,
+ ebc_cmd, sizeof(ebc_begin));
+ kfree(ebc_cmd);
+ if (ret != 0) {
pr_err("The watchdog cannot be initialized\n");
return -EINVAL;
}