how to find if unregister_chrdev() call was successful

后端 未结 1 783
被撕碎了的回忆
被撕碎了的回忆 2021-01-04 01:18

unregister_chrdev() call from [linux\\fs.h] used to return 0 if successful and <0 other wise. But now, in newer kernel versions, the return value of the function has been

相关标签:
1条回答
  • 2021-01-04 01:58

    The return of void was done by changeset: e53252d97e670a38b1d2e9723b48077bba11ffffda

    commit e53252d97e670a38b1d2e9723b48077bba11ffffda
    Author: Akinobu Mita 
    Date:   Thu Jul 19 01:47:51 2007 -0700
    
        unregister_chrdev() return void
    
        unregister_chrdev() does not return meaningful value.  This patch makes it
        return void like most unregister_* functions.
    

    In fact if you look at the code before (from 2.6.12-rc2 onwards) you can see it always returned 0 so this is a function that is always expected to succeed.

    0 讨论(0)
提交回复
热议问题