lkml.org 
[lkml]   [2018]   [Nov]   [23]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH v2 net-next] ptp: Fix pass zero to ERR_PTR() in ptp_clock_register
On Fri, Nov 23, 2018 at 09:54:55AM +0800, YueHaibing wrote:
> @@ -264,6 +266,7 @@ struct ptp_clock *ptp_clock_register(struct ptp_clock_info *info,
> pps.owner = info->owner;
> ptp->pps_source = pps_register_source(&pps, PTP_PPS_DEFAULTS);
> if (!ptp->pps_source) {
> + err = -EINVAL;

Bonus points: The function, pps_register_source(), keeps error codes
in a local variable, but it does not make use of the code. There are
only five callers of that function, and so it would be nice to let
pps_register_source() return the error code.

For the present patch:

Acked-by: Richard Cochran <richardcochran@gmail.com>

\
 
 \ /
  Last update: 2018-11-23 17:38    [W:0.038 / U:0.044 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site