hwrng: intel - return -ENOMEM when ioremap() fails
Subsystems (2)
PATCH 1/2 hwrng: intel - return -ENOMEM when ioremap() fails
intel_init_hw_struct() incorrectly returns -EBUSY when ioremap() fails. Return -ENOMEM instead.
--- drivers/char/hw_random/intel-rng.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
drivers/char/hw_random/intel-rng.c +2 -2
@@ -318,8 +318,8 @@ PFX "RNG, try using the 'no_fwh_detect' option.\n"; } intel_rng_hw->mem =ioremap (INTEL_FWH_ADDR ,INTEL_FWH_ADDR_LEN ); -if (intel_rng_hw->mem ==NULL ) -return -EBUSY ; +if (!intel_rng_hw->mem) +return -ENOMEM ;return 0 ; }
PATCH 2/2 hwrng: intel - return -ENOMEM when kmalloc_obj() fails
intel_rng_mod_init() incorrectly returns -ENODEV when kmalloc_obj() fails. Return -ENOMEM instead.
--- drivers/char/hw_random/intel-rng.c | 1 + 1 file changed, 1 insertion(+)
drivers/char/hw_random/intel-rng.c +1 -0
@@ -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; }
Herbert Xu
maintainerRe: [PATCH 2/2] hwrng: intel - return -ENOMEM when kmalloc_obj() fails
Quoted 8 lines · Thorsten Blum
intel_rng_mod_init()incorrectly returns-ENODEVwhenkmalloc_obj()fails. Return-ENOMEMinstead.Fixes ee527cd3a20c ("Use stop_machine_run in the Intel RNG driver")Signed-off-by Thorsten Blum <[email protected]>--- drivers/char/hw_random/intel-rng.c | 1 + 1 file changed, 1 insertion(+)
Patch applied. Thanks.
Signature · 3 lines
Email: Herbert Xu <[email protected]> Home Page: http://gondor.apana.org.au/~herbert/ PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt
Herbert Xu
maintainerQuoted 4 lines · Thorsten Blum
intel_init_hw_struct()incorrectly returns-EBUSYwhenioremap()fails. Return-ENOMEMinstead.Fixes 641dd002d207 ("[PATCH] fix Intel RNG detection")
This commit ID appears to be incorrect (but the subject is correct).
Thanks,
Signature · 3 lines
Email: Herbert Xu <[email protected]> Home Page: http://gondor.apana.org.au/~herbert/ PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt
Quoted 7 lines · Herbert Xu
Quoted 4 lines · Thorsten Blum
intel_init_hw_struct()incorrectly returns-EBUSYwhenioremap()fails. Return-ENOMEMinstead.Fixes 641dd002d207 ("[PATCH] fix Intel RNG detection")This commit ID appears to be incorrect (but the subject is correct).
The commit ID is from stable, in mainline it is:
The correct tag is therefore:
Should I submit a v2 or can you apply it like this?
Thanks,
Thorsten