hc
2024-01-03 2f7c68cb55ecb7331f2381deb497c27155f32faf
kernel/drivers/misc/ocxl/file.c
....@@ -543,8 +543,11 @@
543543 goto err_put;
544544
545545 rc = device_register(&info->dev);
546
- if (rc)
547
- goto err_put;
546
+ if (rc) {
547
+ free_minor(info);
548
+ put_device(&info->dev);
549
+ return rc;
550
+ }
548551
549552 rc = ocxl_sysfs_register_afu(info);
550553 if (rc)