mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-30 03:27:44 -04:00
lightnvm: check mm before use
The core can may issue I/Os before a media manager is registered with the lightnvm subsystem. Make sure that we don't call the media manager ->end_io prematurely with a null pointer. Signed-off-by: Matias Bjørling <[email protected]> Signed-off-by: Jens Axboe <[email protected]>
This commit is contained in:
parent
e9b76a80f1
commit
437f8f9a1e
1 changed files with 1 additions and 1 deletions
|
|
@ -455,7 +455,7 @@ static void nvme_nvm_end_io(struct request *rq, int error)
|
|||
struct nvm_rq *rqd = rq->end_io_data;
|
||||
struct nvm_dev *dev = rqd->dev;
|
||||
|
||||
if (dev->mt->end_io(rqd, error))
|
||||
if (dev->mt && dev->mt->end_io(rqd, error))
|
||||
pr_err("nvme: err status: %x result: %lx\n",
|
||||
rq->errors, (unsigned long)rq->special);
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue