lkml.org 
[lkml]   [2012]   [May]   [10]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH 1/2] staging: android: logger: Allocate logs dynamically at boot (v2)
On Thu, May 10, 2012 at 02:16:31PM -0700, Tim Bird wrote:
> + log->misc.minor = MISC_DYNAMIC_MINOR;
> + log->misc.name = kstrdup(log_name, GFP_KERNEL);
> + if (log->misc.name == NULL) {
> + ret = -1;
> + goto out_free_log;

Please return a "real" error number, not just -1. You do this a few
times in this function, -EINVAL perhaps? -1 is -EPERM, which is not
what you want to be saying here, right?

thanks,

greg k-h


\
 
 \ /
  Last update: 2012-05-11 00:01    [W:0.042 / U:1.764 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site