#ifndef COLORIZE_H #define COLORIZE_H #define colorize_start(fore) "\033[" __##fore "m" #define colorize_start_full(fore, back) "\033[" __##fore ";" __on_##back "m" #define colorize_end() "\033[" __reset "m" #endif /* COLORIZE_H */ ernate' title='Atom feed' href='https://git.distanz.ch/cgit.cgi/linux/net-next.git/atom/?h=packet-loop-back' type='application/atom+xml'/>
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPan Bian <bianpan2016@163.com>2016-12-01 10:10:46 +0800
committerJens Axboe <axboe@fb.com>2016-12-01 08:01:14 -0700
commit5b0e34e1949ed580ac330041dccb0334b926554e (patch)
tree6ed363eecdcb05bdb2eb793a71f8c4bc34ee23c6
parentd262920998c891dfd87cf73f823f0ff60e20cdad (diff)
block: mtip32xx: set error code on failure
Fix bug https://bugzilla.kernel.org/show_bug.cgi?id=188531. In function mtip_block_initialize(), variable rv takes the return value, and its value should be negative on errors. rv is initialized as 0 and is not reset when the call to ida_pre_get() fails. So 0 may be returned. The return value 0 indicates that there is no error, which may be inconsistent with the execution status. This patch fixes the bug by explicitly assigning -ENOMEM to rv on the branch that ida_pre_get() fails. Signed-off-by: Pan Bian <bianpan2016@163.com> Signed-off-by: Jens Axboe <axboe@fb.com>