treewide: remove redundant IS_ERR() before error code check
[linux/fpc-iii.git] / drivers / misc / ocxl / main.c
blobef73cf35dda2b3d69f1215c90845af3489cd9be8
1 // SPDX-License-Identifier: GPL-2.0+
2 // Copyright 2017 IBM Corp.
3 #include <linux/module.h>
4 #include <linux/pci.h>
5 #include <asm/mmu.h>
6 #include "ocxl_internal.h"
8 static int __init init_ocxl(void)
10 int rc = 0;
12 if (!tlbie_capable)
13 return -EINVAL;
15 rc = ocxl_file_init();
16 if (rc)
17 return rc;
19 rc = pci_register_driver(&ocxl_pci_driver);
20 if (rc) {
21 ocxl_file_exit();
22 return rc;
24 return 0;
27 static void exit_ocxl(void)
29 pci_unregister_driver(&ocxl_pci_driver);
30 ocxl_file_exit();
33 module_init(init_ocxl);
34 module_exit(exit_ocxl);
36 MODULE_DESCRIPTION("Open Coherent Accelerator");
37 MODULE_LICENSE("GPL");