]> git.baikalelectronics.ru Git - kernel.git/commit
hwrng: amd - Fix return value check in mod_init()
authorWei Yongjun <weiyongjun1@huawei.com>
Fri, 16 Sep 2016 01:49:41 +0000 (01:49 +0000)
committerHerbert Xu <herbert@gondor.apana.org.au>
Thu, 22 Sep 2016 10:27:48 +0000 (18:27 +0800)
commit82e1b7ea47bd1816c140d9915be0b8e38607355a
tree1c7a1a2ac982e875532e10a81294c1bebdff2295
parent7e9b145b1cfc054ca4ce4e11a8d76b146e3eb923
hwrng: amd - Fix return value check in mod_init()

In case of error, the function devm_kzalloc() or devm_ioport_map()
return NULL pointer not ERR_PTR(). The IS_ERR() test in the return
value check should be replaced with NULL test.

Fixes: ab3bf1ee8f1f ("hwrng: amd - Migrate to managed API")
Signed-off-by: Wei Yongjun <weiyongjun1@huawei.com>
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
drivers/char/hw_random/amd-rng.c