From: YueHaibing <yuehaibing@huawei.com>
To: Richard Cochran <richardcochran@gmail.com>
Cc: <davem@davemloft.net>, <dmitry.torokhov@gmail.com>,
<linux-kernel@vger.kernel.org>, <netdev@vger.kernel.org>
Subject: Re: [PATCH v2 net-next] ptp: Fix pass zero to ERR_PTR() in ptp_clock_register
Date: Mon, 26 Nov 2018 18:20:56 +0800 [thread overview]
Message-ID: <e4f5f7d7-f01b-8f94-30b8-daf6a7d2f8a3@huawei.com> (raw)
In-Reply-To: <20181123163714.rxp766mx63bnx4tb@localhost>
On 2018/11/24 0:37, Richard Cochran wrote:
> 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.
Ok, I will post a new patch to do it.
>
> For the present patch:
>
> Acked-by: Richard Cochran <richardcochran@gmail.com>
>
>
next prev parent reply other threads:[~2018-11-26 10:21 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-11-23 1:54 YueHaibing
2018-11-23 16:37 ` Richard Cochran
2018-11-26 10:20 ` YueHaibing [this message]
2018-11-24 2:04 ` David Miller
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=e4f5f7d7-f01b-8f94-30b8-daf6a7d2f8a3@huawei.com \
--to=yuehaibing@huawei.com \
--cc=davem@davemloft.net \
--cc=dmitry.torokhov@gmail.com \
--cc=linux-kernel@vger.kernel.org \
--cc=netdev@vger.kernel.org \
--cc=richardcochran@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®