> up_read(&parent->unreg_sem); > - put_device(&mdev->dev); > mdev_fail: > > > > - mdev_put_parent(parent); > + put_device(&mdev->dev); That mdev_fail label is not very descriptive, what about free_device instead? Otherwise looks good: Reviewed-by: Christoph Hellwig <hch@xxxxxx>