Re: [PATCH 1/2] staging: android: logger: Allocate logs dynamicallyat boot (v2)

From: Greg KH
Date: Thu May 10 2012 - 17:21:23 EST


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
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/