From: Wolfgang Grandegger <wg@grandegger.com>
To: Marc Kleine-Budde <mkl@pengutronix.de>
Cc: "Max S." <max@schneidersoft.net>,
"linux-can@vger.kernel.org" <linux-can@vger.kernel.org>
Subject: Re: GS_USB
Date: Mon, 09 Dec 2013 14:15:39 +0100 [thread overview]
Message-ID: <52A5C27B.1030804@grandegger.com> (raw)
In-Reply-To: <52A5A0E5.4020605@pengutronix.de>
On 12/09/2013 11:52 AM, Marc Kleine-Budde wrote:
> Hello Wolfgang,
>
> thanks for reviewing the driver.
>
> On 12/07/2013 11:06 AM, Wolfgang Grandegger wrote:
>>> +static struct gs_can *gs_make_candev(unsigned int channel,
>>>> + struct usb_interface *intf)
>
> This function returns a struct gs_can pointer...
>
>>>> +{
>>>> + struct gs_can *dev;
>>>> + struct net_device *netdev;
>>>> + int rc;
>>>> + struct gs_device_bt_const *bt_const;
>>>> +
>>>> + bt_const = kmalloc(sizeof(*bt_const), GFP_KERNEL);
>>>> + if (!bt_const)
>>>> + return ERR_PTR(-ENOMEM);
>> This function does not return an error code, therefore just:
>>
>> return -ENOMEM;
>
> ....so ERR_PTR(-ENOMEM) is correct. The error value "-ENOMEM" has to be
> converted to a pointer and this is what ERR_PTR does. The same is true
> for the rest of this function.
Of course. Obviously I got confused as well.
Wolfgang.
prev parent reply other threads:[~2013-12-09 13:15 UTC|newest]
Thread overview: 25+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-10-04 12:31 GS_USB Max S.
2013-10-04 13:23 ` GS_USB Marc Kleine-Budde
2013-10-05 20:36 ` GS_USB Wolfgang Grandegger
2013-10-07 14:22 ` GS_USB Max S.
2013-10-07 14:37 ` GS_USB Wolfgang Grandegger
2013-10-07 19:52 ` GS_USB Max S.
2013-10-07 20:30 ` GS_USB Wolfgang Grandegger
2013-11-03 17:12 ` GS_USB Max S.
2013-11-03 19:42 ` GS_USB Wolfgang Grandegger
2013-11-09 23:19 ` GS_USB Wolfgang Grandegger
2013-11-11 2:10 ` GS_USB Max S.
2013-11-11 8:05 ` GS_USB Wolfgang Grandegger
2013-11-11 15:41 ` GS_USB Oliver Hartkopp
[not found] ` <1384199350.3483.20.camel@blackbox>
2013-11-11 21:49 ` GS_USB Oliver Hartkopp
2013-11-15 10:39 ` GS_USB Max S.
2013-11-23 16:05 ` GS_USB Max S.
2013-12-04 21:17 ` GS_USB Max S.
2013-12-05 19:05 ` GS_USB Oliver Hartkopp
2013-12-05 19:07 ` GS_USB Oliver Hartkopp
2013-12-09 17:53 ` GS_USB Max S.
2013-12-05 20:18 ` GS_USB Wolfgang Grandegger
2013-12-05 20:42 ` GS_USB Wolfgang Grandegger
2013-12-07 10:06 ` GS_USB Wolfgang Grandegger
2013-12-09 10:52 ` GS_USB Marc Kleine-Budde
2013-12-09 13:15 ` Wolfgang Grandegger [this message]
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=52A5C27B.1030804@grandegger.com \
--to=wg@grandegger.com \
--cc=linux-can@vger.kernel.org \
--cc=max@schneidersoft.net \
--cc=mkl@pengutronix.de \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.