lkml.org 
[lkml]   [2015]   [Aug]   [3]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH 4/4] drivers:pci:hv: New paravirtual PCI front-end for Hyper-V VMs
On Mon, Aug 03, 2015 at 11:18:12AM +0200, Paul Bolle wrote:
> On zo, 2015-08-02 at 00:54 +0000, jakeo@microsoft.com 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?

You're right, of course. The error handling is buggy.

regards,
dan carpenter



\
 
 \ /
  Last update: 2015-08-03 12:21    [W:0.087 / U:1.652 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site