lib/genalloc.c: check result of devres_alloc()
authorJan Kara <jack@suse.cz>
Fri, 13 Feb 2015 22:36:47 +0000 (14:36 -0800)
committerLinus Torvalds <torvalds@linux-foundation.org>
Sat, 14 Feb 2015 05:21:36 +0000 (21:21 -0800)
commit310ee9e8f370f8fd7a76856726aea88839bb0f8f
treee1cb008a16a701566c81f89ad4d68cc714b34381
parent8da53d4595a53fb9a3380dd4d1c9bc24c7c9aab8
lib/genalloc.c: check result of devres_alloc()

devm_gen_pool_create() calls devres_alloc() and dereferences its result
without checking whether devres_alloc() succeeded.  Check for error and
bail out if it happened.

Coverity-id 1016493.

Signed-off-by: Jan Kara <jack@suse.cz>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
lib/genalloc.c