Re: [PATCH 4/4] drivers:pci:hv: New paravirtual PCI front-end for Hyper-V VMs

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On zo, 2015-08-02 at 00:54 +0000, jakeo@xxxxxxxxxxxxx wrote:
> --- /dev/null
> +++ b/drivers/pci/host/hv_pcifront.c

> +static void exit_hv_pci_drv(void)
> +{
> +	vmbus_driver_unregister(&hv_pci_drv);
> +}
> +
> +static int __init init_hv_pci_drv(void)
> +{
> +	int ret;
> +
> +	/* Register this driver with VMBus. */
> +	ret = vmbus_driver_register(&hv_pci_drv);
> +
> +	if (ret < 0)
> +		exit_hv_pci_drv();
> +
> +	return ret;
> +}

Wouldn't just
    static int __init init_hv_pci_drv(void)
    {
    	return vmbus_driver_register(&hv_pci_drv);
    }

suffice here? That would also allow to mark exit_hv_pci_drv() with
__exit.

> +module_init(init_hv_pci_drv);
> +module_exit(exit_hv_pci_drv);

Thanks,


Paul Bolle
_______________________________________________
devel mailing list
devel@xxxxxxxxxxxxxxxxxxxxxx
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel



[Index of Archives]     [Linux Driver Backports]     [DMA Engine]     [Linux GPIO]     [Linux SPI]     [Video for Linux]     [Linux USB Devel]     [Linux Coverity]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [Yosemite Backpacking]
  Powered by Linux