On Thu, Sep 13, 2018 at 03:25:27PM -0700, Stephen Hemminger wrote: > +/* VMBus primary channel is opened on first use */ > +static int > +hv_uio_open(struct uio_info *info, struct inode *inode) > +{ > + struct hv_uio_private_data *pdata > + = container_of(info, struct hv_uio_private_data, info); > + struct hv_device *dev = pdata->device; > + int ret; > + > + if (atomic_inc_return(&pdata->refcnt) != 1) > + return 0; > + > + ret = vmbus_connect_ring(dev->channel, > + hv_uio_channel_cb, dev->channel); > + > + if (ret == 0) > + dev->channel->inbound.ring_buffer->interrupt_mask = 1; > + > + return ret; I think we should decrement pdata->refcnt if vmbus_connect_ring() fails? > +} regards, dan carpenter _______________________________________________ devel mailing list devel@xxxxxxxxxxxxxxxxxxxxxx http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel