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:
Thorsten Blum 2026-09-22 20:11:02 +02:00 committed by Herbert Xu
parent 3a31a4baad
commit a0590c556c

View File

@ -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;
}