ataflop: fix off by one in ataflop_probe()
Smatch complains that the "type > NUM_DISK_MINORS" should be >= instead of >. We also need to subtract one from "type" at the start. Fixes: bf9c0538 ("ataflop: use a separate gendisk for each media format") Reported-by:kernel test robot <lkp@intel.com> Signed-off-by:
Dan Carpenter <dan.carpenter@oracle.com> Reviewed-by:
Christoph Hellwig <hch@lst.de> Signed-off-by:
Jens Axboe <axboe@kernel.dk>
parent
1ffec389
Please register or sign in to comment