From: Tony Lindgren <tony@atomide.com>
To: Pavel Machek <pavel@denx.de>
Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
Johan Hovold <johan@kernel.org>, Rob Herring <robh@kernel.org>,
Alan Cox <gnomes@lxorguk.ukuu.org.uk>,
Lee Jones <lee.jones@linaro.org>, Jiri Slaby <jslaby@suse.cz>,
Merlijn Wajer <merlijn@wizzup.org>,
Peter Hurley <peter@hurleysoftware.com>,
Sebastian Reichel <sre@kernel.org>,
linux-serial@vger.kernel.org, devicetree@vger.kernel.org,
linux-kernel@vger.kernel.org, linux-omap@vger.kernel.org
Subject: Re: [PATCH 1/6] tty: n_gsm: Add support for serdev drivers
Date: Fri, 1 May 2020 14:31:11 -0700 [thread overview]
Message-ID: <20200501213111.GF37466@atomide.com> (raw)
In-Reply-To: <20200501203130.GC6043@duo.ucw.cz>
* Pavel Machek <pavel@denx.de> [200501 20:32]:
> > +static struct gsm_dlci *gsd_dlci_get(struct gsm_serdev *gsd, int line,
> > + bool allocate)
> > +{
> > + struct gsm_mux *gsm;
> > + struct gsm_dlci *dlci;
> > +
> > + if (!gsd || !gsd->gsm)
> > + return ERR_PTR(-ENODEV);
> > +
> > + gsm = gsd->gsm;
> > +
> > + if (line < 1 || line >= 63)
> > + return ERR_PTR(-EINVAL);
> > +
> > + mutex_lock(&gsm->mutex);
> ...
> > + dlci = gsm_dlci_alloc(gsm, line);
> > + if (!dlci) {
> > + gsm = ERR_PTR(-ENOMEM);
> > + goto unlock;
>
> dlci = , or you get nice crash.
Ah thanks yeah we return dlci and need to set dlci instead:
if (!dlci) {
dlci = ERR_PTR(-ENOMEM);
goto unlock;
}
Regards,
Tony
next prev parent reply other threads:[~2020-05-01 21:31 UTC|newest]
Thread overview: 30+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-04-30 17:46 [PATCHv6 0/6] n_gsm serdev support and GNSS driver for droid4 Tony Lindgren
2020-04-30 17:46 ` [PATCH 1/6] tty: n_gsm: Add support for serdev drivers Tony Lindgren
2020-05-01 20:31 ` Pavel Machek
2020-05-01 21:31 ` Tony Lindgren [this message]
2020-04-30 17:46 ` [PATCH 2/6] dt-bindings: serdev: ngsm: Add binding for serdev-ngsm Tony Lindgren
2020-05-01 20:33 ` Pavel Machek
2020-05-12 15:37 ` Rob Herring
2020-04-30 17:46 ` [PATCH 3/6] serdev: ngsm: Add generic serdev-ngsm driver Tony Lindgren
2020-05-01 20:44 ` Pavel Machek
2020-04-30 17:46 ` [PATCH 4/6] dt-bindings: gnss: Add binding for Motorola Mapphone MDM6600 GNSS Tony Lindgren
2020-05-01 20:45 ` Pavel Machek
2020-05-01 21:14 ` Rob Herring
2020-05-01 21:19 ` Rob Herring
2020-05-01 21:25 ` Tony Lindgren
2020-04-30 17:46 ` [PATCH 5/6] gnss: motmdm: Add support for Motorola Mapphone MDM6600 modem Tony Lindgren
2020-05-01 20:51 ` Pavel Machek
2020-04-30 17:46 ` [PATCH 6/6] ARM: dts: omap4-droid4: Configure modem for serdev-ngsm Tony Lindgren
2020-05-01 20:53 ` Pavel Machek
2020-04-30 22:26 ` [PATCHv6 0/6] n_gsm serdev support and GNSS driver for droid4 Pavel Machek
2020-05-01 14:52 ` Tony Lindgren
2020-05-01 22:06 ` Pavel Machek
2020-05-01 8:21 ` Pavel Machek
2020-05-01 14:20 ` Tony Lindgren
2020-05-01 20:19 ` Pavel Machek
2020-05-01 20:32 ` Tony Lindgren
2020-05-01 20:23 ` Pavel Machek
2020-05-12 21:47 [PATCHv8 " Tony Lindgren
2020-05-12 21:47 ` [PATCH 1/6] tty: n_gsm: Add support for serdev drivers Tony Lindgren
2020-05-13 19:24 ` Pavel Machek
2020-05-28 9:31 ` Johan Hovold
2020-11-29 20:51 ` Pavel Machek
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=20200501213111.GF37466@atomide.com \
--to=tony@atomide.com \
--cc=devicetree@vger.kernel.org \
--cc=gnomes@lxorguk.ukuu.org.uk \
--cc=gregkh@linuxfoundation.org \
--cc=johan@kernel.org \
--cc=jslaby@suse.cz \
--cc=lee.jones@linaro.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-omap@vger.kernel.org \
--cc=linux-serial@vger.kernel.org \
--cc=merlijn@wizzup.org \
--cc=pavel@denx.de \
--cc=peter@hurleysoftware.com \
--cc=robh@kernel.org \
--cc=sre@kernel.org \
/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;
as well as URLs for NNTP newsgroup(s).