Re: [PATCH 2/2] drm: make unplugged flag specific to udl driver

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

 



Hi

On Wed, Feb 10, 2016 at 9:51 PM, Haixia Shi <hshi@xxxxxxxxxxxx> wrote:
>> This should rather be:
>>
>>         drm_release(inode, filp);
>>         mutex_lock(&drm_global_mutex);
>>         if (!dev->open_count && udl_device_is_unplugged(dev))
>>                 drm_put_dev(dev);
>>         mutex_unlock(&drm_global_mutex);
>>
>>         return 0;
>>
>> There is no reason to look at the return code of drm_release(), ever.
>
> But drm_release() does return a retcode. It would still make sense to return
> that as-is in case any existing code relies on it.

Nobody should ever return error codes from fops.release(). It is
completely bogus. You rather confuse generic user-space that calls
close(), than getting any benefit out of it.

But TBH, I don't care. Feel free to forward the return value. But
still, please change the order of the calls as I did.

Thanks
David
_______________________________________________
dri-devel mailing list
dri-devel@xxxxxxxxxxxxxxxxxxxxx
https://lists.freedesktop.org/mailman/listinfo/dri-devel




[Index of Archives]     [Linux DRI Users]     [Linux Intel Graphics]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [XFree86]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [XFree86]
  Powered by Linux