]> git.baikalelectronics.ru Git - kernel.git/commit
bsg: fix potential error pointer dereference
authorJens Axboe <axboe@fb.com>
Thu, 28 Aug 2014 21:05:40 +0000 (15:05 -0600)
committerJens Axboe <axboe@fb.com>
Fri, 29 Aug 2014 14:34:14 +0000 (08:34 -0600)
commitc996705911d0b7f8e8e9469d3bd92779139afbe1
treee1747d5c4a677f2266388eccf4f03c772a786345
parent2c584940bbabda4e3a4fba473444eeca0fe220f6
bsg: fix potential error pointer dereference

Dan writes:

block/bsg.c:327 bsg_map_hdr() error: 'next_rq' dereferencing possible
ERR_PTR().

Fix this by setting next_rq to NULL, for the case where it can be
!= NULL but an error pointer.

Reported-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Jens Axboe <axboe@fb.com>
block/bsg.c