summaryrefslogtreecommitdiffstats
path: root/drivers/block/null_blk.c
diff options
context:
space:
mode:
authorDan Carpenter <dan.carpenter@oracle.com>2017-08-23 13:20:57 +0200
committerJens Axboe <axboe@kernel.dk>2017-08-23 16:36:45 +0200
commit92d499d4905ce79c41a4b9a399ab6b89188f87e9 (patch)
treec08997e6fec4b9f5bd205c3ba7d00ee24e8f47ef /drivers/block/null_blk.c
parentskd: Uninitialized variable in skd_isr_completion_posted() (diff)
downloadlinux-92d499d4905ce79c41a4b9a399ab6b89188f87e9.tar.xz
linux-92d499d4905ce79c41a4b9a399ab6b89188f87e9.zip
skd: error pointer dereference in skd_cons_disk()
My initial impulse was to check for IS_ERR_OR_NULL() but when I looked at this code a bit more closely, we should only need to check for IS_ERR(). The blk_mq_alloc_tag_set() returns negative error codes and zero on success so we can just do an "if (rc) goto err_out;". It's better to preserve the error code anyhow. The blk_mq_init_queue() returns error pointers on failure, it never returns NULL. We can also remove the "q = NULL;" at the start because that's no longer needed. Fixes: ca33dd92968b ("skd: Convert to blk-mq") Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com> Signed-off-by: Jens Axboe <axboe@kernel.dk>
Diffstat (limited to 'drivers/block/null_blk.c')
0 files changed, 0 insertions, 0 deletions