On 11/12/19 4:25 AM, Bean Huo (beanhuo) wrote:
+ err = -ENOMEM; + hba->cmd_queue = blk_mq_init_queue(&hba->host->tag_set); + if (!hba->cmd_queue)It is possible to return ERR_PTR(-ENOMEM) in blk_mq_init_queue(),, Here just checkup if not NULL is not safe enough.
Agreed, this should be changed into an IS_ERR() check. Bart.