lkml.org 
[lkml]   [2013]   [May]   [31]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH 05/16] perf, persistent: Return resonable error code
On Fri, May 31, 2013 at 10:47:25AM +0200, Robert Richter wrote:
> From: Robert Richter <robert.richter@calxeda.com>
>
> Returning -ENODEV if no file descriptor is found. An error code of -1
> (-EPERM) is misleading in this case.
>
> Signed-off-by: Robert Richter <robert.richter@calxeda.com>
> ---
> kernel/events/persistent.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/kernel/events/persistent.c b/kernel/events/persistent.c
> index 6612eb77..190aa75 100644
> --- a/kernel/events/persistent.c
> +++ b/kernel/events/persistent.c
> @@ -165,7 +165,7 @@ int perf_get_persistent_event_fd(unsigned cpu, struct perf_event_attr *attr)
> if (desc->attr->config == attr->config)
> return __alloc_persistent_event_fd(desc);
>
> - return -1;
> + return -ENODEV;

Ditto.


\
 
 \ /
  Last update: 2013-05-31 11:41    [W:0.110 / U:0.856 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site