]> asedeno.scripts.mit.edu Git - linux.git/commit
rslib: Simplify error path
authorThomas Gleixner <tglx@linutronix.de>
Sun, 22 Apr 2018 16:23:52 +0000 (18:23 +0200)
committerKees Cook <keescook@chromium.org>
Wed, 25 Apr 2018 02:50:08 +0000 (19:50 -0700)
commita85e126abf944884d5b3eba86ec7d541e8327256
treeef5e3a7ca4d1d22c5b9de0ffe44c79589ae04550
parent689c6efdfb58d7b21c375f515349e4091e08100b
rslib: Simplify error path

The four error path labels in rs_init() can be reduced to one by allocating
the struct with kzalloc so the pointers in the struct are NULL and can be
unconditionally handed in to kfree() because they either point to an
allocation or are NULL.

Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Signed-off-by: Kees Cook <keescook@chromium.org>
lib/reed_solomon/reed_solomon.c