mirror of
https://github.com/torvalds/linux.git
synced 2026-11-07 06:17:02 +01:00
hwrng: intel - return -ENOMEM when kmalloc_obj() fails
intel_rng_mod_init() incorrectly returns -ENODEV when kmalloc_obj()
fails. Return -ENOMEM instead.
Fixes: ee527cd3a2 ("Use stop_machine_run in the Intel RNG driver")
Signed-off-by: Thorsten Blum <blum@kernel.org>
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
This commit is contained in:
parent
3a31a4baad
commit
a0590c556c
|
|
@ -349,6 +349,7 @@ static int __init intel_rng_mod_init(void)
|
|||
intel_rng_hw = kmalloc_obj(*intel_rng_hw);
|
||||
if (!intel_rng_hw) {
|
||||
pci_dev_put(dev);
|
||||
err = -ENOMEM;
|
||||
goto out;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user