]> git.baikalelectronics.ru Git - kernel.git/commit
ramoops: move spin_lock_init after kmalloc error checking
authorGeliang Tang <geliangtang@gmail.com>
Tue, 30 Aug 2016 12:24:42 +0000 (20:24 +0800)
committerKees Cook <keescook@chromium.org>
Thu, 8 Sep 2016 22:01:13 +0000 (15:01 -0700)
commitf2abf8f38981aab70da6c9b7ee1714bde4cb17aa
tree5201d40100d0c6dedb3ed9244828804dfb682cb7
parent4afaa971e0ff35dd02d00f7509b00b2cca988751
ramoops: move spin_lock_init after kmalloc error checking

If cxt->pstore.buf allocated failed, no need to initialize
cxt->pstore.buf_lock. So this patch moves spin_lock_init() after the
error checking.

Signed-off-by: Geliang Tang <geliangtang@gmail.com>
Signed-off-by: Kees Cook <keescook@chromium.org>
fs/pstore/ram.c