]> git.karo-electronics.de Git - karo-tx-linux.git/commit
dm cache: fix error return code in cache_create
authorWei Yongjun <yongjun_wei@trendmicro.com.cn>
Fri, 10 May 2013 13:37:14 +0000 (14:37 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sun, 19 May 2013 18:38:17 +0000 (11:38 -0700)
commit3dc73aa4030321924423ebc662dcf6f382fef5b3
treec8b02a37023e20b40c5caf141cf7e6c96582cca9
parent62253ab07cbbb924ba69cbb4e050b42b008a6884
dm cache: fix error return code in cache_create

commit fa4d683af3693863bec761e2761a07e4c1351f86 upstream.

Return -ENOMEM if memory allocation fails in cache_create
instead of 0 (to avoid NULL pointer dereference).

Signed-off-by: Wei Yongjun <yongjun_wei@trendmicro.com.cn>
Signed-off-by: Alasdair G Kergon <agk@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/md/dm-cache-target.c