Thanks for a patch. On 2022/04/13 21:13, Jack Wang wrote: > @@ -1792,6 +1793,13 @@ static int __init rnbd_client_init(void) > err); > unregister_blkdev(rnbd_client_major, "rnbd"); I think you want return err; here so that alloc_workqueue() won't be called when rnbd_clt_create_sysfs_files() returned an error. > } > + rnbd_clt_wq = alloc_workqueue("rnbd_clt_wq", 0, 0); > + if (!rnbd_clt_wq) { > + pr_err("Failed to load module, alloc_workqueue failed.\n"); > + rnbd_clt_destroy_sysfs_files(); > + unregister_blkdev(rnbd_client_major, "rnbd"); > + err = -ENOMEM; > + } > > return err; > }