lkml.org 
[lkml]   [2011]   [May]   [24]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    Patch in this message
    /
    Date
    From
    Subject[PATCH] posix clocks: correct error value in posix_clock_poll()
    Signed-off-by: Nicolas Kaiser <nikai@nikai.net>
    ---
    It looks to me like -ENODEV might not be a good return value
    in poll(). Would POLLERR be the correct one in this case?

    kernel/time/posix-clock.c | 2 +-
    1 files changed, 1 insertions(+), 1 deletions(-)

    diff --git a/kernel/time/posix-clock.c b/kernel/time/posix-clock.c
    index c340ca6..2424d3f 100644
    --- a/kernel/time/posix-clock.c
    +++ b/kernel/time/posix-clock.c
    @@ -71,7 +71,7 @@ static unsigned int posix_clock_poll(struct file *fp, poll_table *wait)
    int result = 0;

    if (!clk)
    - return -ENODEV;
    + return POLLERR;

    if (clk->ops.poll)
    result = clk->ops.poll(clk, fp, wait);
    --
    1.7.5.rc3

    \
     
     \ /
      Last update: 2011-05-24 12:57    [W:0.021 / U:60.500 seconds]
    ©2003-2016 Jasper Spaans. hosted at Digital OceanAdvertise on this site