mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-29 03:01:39 -04:00
wusb: fix error return code in wusb_prf()
Fix to return error code -ENOMEM from the kmalloc() error handling
case instead of 0, as done elsewhere in this function.
Fixes: a19b882c07 ("wusb: Stop using the stack for sg crypto scratch space")
Signed-off-by: Wei Yongjun <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
This commit is contained in:
parent
733cbe0698
commit
1ee1710cd6
1 changed files with 3 additions and 1 deletions
|
|
@ -339,8 +339,10 @@ ssize_t wusb_prf(void *out, size_t out_size,
|
|||
goto error_setkey_aes;
|
||||
}
|
||||
scratch = kmalloc(sizeof(*scratch), GFP_KERNEL);
|
||||
if (!scratch)
|
||||
if (!scratch) {
|
||||
result = -ENOMEM;
|
||||
goto error_alloc_scratch;
|
||||
}
|
||||
|
||||
for (bitr = 0; bitr < (len + 63) / 64; bitr++) {
|
||||
sfn_le = cpu_to_le64(sfn++);
|
||||
|
|
|
|||
Loading…
Reference in a new issue