Re: [PATCH v2 3/4] virtio: rng: delay hwrng_register() till driver is ready

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

 



On Mon, Jul 21, 2014 at 08:41:24PM +0800, Herbert Xu wrote:
> On Mon, Jul 21, 2014 at 08:11:16AM -0400, Jason Cooper wrote:
> >
> > > @@ -136,15 +137,6 @@ static int probe_common(struct virtio_device *vdev)
> > >  		return err;
> > >  	}
> > >  
> > > -	err = hwrng_register(&vi->hwrng);
> > > -	if (err) {
> > > -		vdev->config->del_vqs(vdev);
> > > -		vi->vq = NULL;
> > > -		kfree(vi);
> > > -		ida_simple_remove(&rng_index_ida, index);
> > > -		return err;
> > > -	}
> > > -
> > 
> > This needs to stay.  register, and failure to do so, should occur in the
> > probe routine.
> 
> Why? 

hmm, yes. On reviewing the code, my objection was silly.  It mostly
stemmed from the commit message's mentioning of reduced error handling.

thx,

Jason.
_______________________________________________
Virtualization mailing list
Virtualization@xxxxxxxxxxxxxxxxxxxxxxxxxx
https://lists.linuxfoundation.org/mailman/listinfo/virtualization




[Index of Archives]     [KVM Development]     [Libvirt Development]     [Libvirt Users]     [CentOS Virtualization]     [Netdev]     [Ethernet Bridging]     [Linux Wireless]     [Kernel Newbies]     [Security]     [Linux for Hams]     [Netfilter]     [Bugtraq]     [Yosemite Forum]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux Admin]     [Samba]

  Powered by Linux