diff options
| author | Pan Bian <[email protected]> | 2016-12-01 02:10:46 +0000 |
|---|---|---|
| committer | Jens Axboe <[email protected]> | 2016-12-01 15:01:14 +0000 |
| commit | 5b0e34e1949ed580ac330041dccb0334b926554e (patch) | |
| tree | 6ed363eecdcb05bdb2eb793a71f8c4bc34ee23c6 /lib/parser.c | |
| parent | nvmet: add support for the Write Zeroes command (diff) | |
| download | kernel-5b0e34e1949ed580ac330041dccb0334b926554e.tar.gz kernel-5b0e34e1949ed580ac330041dccb0334b926554e.zip | |
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 <[email protected]>
Signed-off-by: Jens Axboe <[email protected]>
Diffstat (limited to 'lib/parser.c')
0 files changed, 0 insertions, 0 deletions
