From: Stefan Richter <stefanr@s5r6.in-berlin.de>
To: Jonathan Nieder <jrnieder@gmail.com>
Cc: David Fries <david@fries.net>, Istvan Varga <istvan_v@mailbox.hu>,
linux-media@vger.kernel.org, Darron Broad <darron@kewl.org>,
Steven Toth <stoth@kernellabs.com>
Subject: Re: [PATCH 9/9] [media] firedtv: handle errors from dvb_net_init
Date: Sat, 31 Dec 2011 13:38:03 +0100 [thread overview]
Message-ID: <20111231133803.7d6bc3f5@stein> (raw)
In-Reply-To: <20111231121956.GK16802@elie.Belkin>
On Dec 31 Jonathan Nieder wrote:
> It is not common for dvb_net_init to fail, but after the patch
> "dvb_net_init: return -errno on error" it can fail due to running out
> of memory. Handle this.
> From an audit of dvb_net_init callers.
>
> Signed-off-by: Jonathan Nieder <jrnieder@gmail.com>
Reviewed-by: Stefan Richter <stefanr@s5r6.in-berlin.de>
[...]
> --- a/drivers/media/dvb/firewire/firedtv-dvb.c
> +++ b/drivers/media/dvb/firewire/firedtv-dvb.c
> @@ -203,7 +203,9 @@ int fdtv_dvb_register(struct firedtv *fdtv, const
> char *name) if (err)
> goto fail_rem_frontend;
>
> - dvb_net_init(&fdtv->adapter, &fdtv->dvbnet, &fdtv->demux.dmx);
> + err = dvb_net_init(&fdtv->adapter, &fdtv->dvbnet,
> &fdtv->demux.dmx);
> + if (err)
> + goto fail_disconnect_frontend;
>
> fdtv_frontend_init(fdtv, name);
> err = dvb_register_frontend(&fdtv->adapter, &fdtv->fe);
> @@ -218,6 +220,7 @@ int fdtv_dvb_register(struct firedtv *fdtv, const
> char *name)
> fail_net_release:
> dvb_net_release(&fdtv->dvbnet);
> +fail_disconnect_frontend:
> fdtv->demux.dmx.close(&fdtv->demux.dmx);
> fail_rem_frontend:
> fdtv->demux.dmx.remove_frontend(&fdtv->demux.dmx,
> &fdtv->frontend);
--
Stefan Richter
-=====-==-== ==-- =====
http://arcgraph.de/sr/
next prev parent reply other threads:[~2011-12-31 12:38 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <E1RgiId-0003Qe-SC@www.linuxtv.org>
2011-12-31 11:51 ` [git:v4l-dvb/for_v3.3] [media] cx88-dvb avoid dangling core->gate_ctrl pointer Jonathan Nieder
2011-12-31 11:54 ` [PATCH 1/9] [media] DVB: dvb_net_init: return -errno on error Jonathan Nieder
2011-12-31 17:37 ` Darron Broad
2011-12-31 11:56 ` [PATCH 2/9] [media] videobuf-dvb: avoid spurious ENOMEM when CONFIG_DVB_NET=n Jonathan Nieder
2011-12-31 11:58 ` [PATCH 3/9] [media] dvb-bt8xx: use goto based exception handling Jonathan Nieder
2011-12-31 12:01 ` [PATCH 4/9] [media] ttusb-budget: use goto for " Jonathan Nieder
2011-12-31 12:04 ` [PATCH 5/9] [media] flexcop: handle errors from dvb_net_init Jonathan Nieder
2011-12-31 12:06 ` [PATCH 6/9] [media] dvb-bt8xx: " Jonathan Nieder
2011-12-31 12:08 ` [PATCH 7/9] [media] dm1105: " Jonathan Nieder
2011-12-31 12:10 ` [PATCH 8/9] [media] dvb-usb: " Jonathan Nieder
2011-12-31 12:19 ` [PATCH 9/9] [media] firedtv: " Jonathan Nieder
2011-12-31 12:38 ` Stefan Richter [this message]
2012-01-06 14:52 ` Mauro Carvalho Chehab
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=20111231133803.7d6bc3f5@stein \
--to=stefanr@s5r6.in-berlin.de \
--cc=darron@kewl.org \
--cc=david@fries.net \
--cc=istvan_v@mailbox.hu \
--cc=jrnieder@gmail.com \
--cc=linux-media@vger.kernel.org \
--cc=stoth@kernellabs.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 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.