diff options
author | Heiko Carstens <hca@linux.ibm.com> | 2023-02-06 15:13:45 +0100 |
---|---|---|
committer | Heiko Carstens <hca@linux.ibm.com> | 2023-02-06 15:13:45 +0100 |
commit | 83089c8f502e87ca74dd5f8cd460536c43318fef (patch) | |
tree | 553d2154931a04a2efe9cd59fb3986cd79406ff1 /drivers | |
parent | 6bddf115d0baed3095339024d942d7d1b5e7e4d6 (diff) | |
parent | 7ab41c2c08a32132ba8c14624910e2fe8ce4ba4b (diff) | |
download | linux-stable-83089c8f502e87ca74dd5f8cd460536c43318fef.tar.gz linux-stable-83089c8f502e87ca74dd5f8cd460536c43318fef.tar.bz2 linux-stable-83089c8f502e87ca74dd5f8cd460536c43318fef.zip |
Merge branch 'fixes' into features
Signed-off-by: Heiko Carstens <hca@linux.ibm.com>
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/watchdog/diag288_wdt.c | 15 |
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; } |