linux_dsm_epyc7002/drivers/media/dvb/dvb-core
Jonathan Nieder 58fae6739f [media] DVB: dvb_net_init: return -errno on error
dvb_net_init unconditionally returns 0.  Callers such as
videobuf_dvb_register_frontend examine dvbnet->dvbdev instead of the
return value to tell whether the operation succeeded.  If it has been
set to a valid pointer, success; if it was left equal to NULL,
failure.

Alas, there is an edge case where that logic does not work as well:
when network support has been compiled out (CONFIG_DVB_NET=n), we want
dvb_net_init and related operations to behave as no-ops and always
succeed, but there is no appropriate value to which to set dvb->dvbdev
to indicate this.

Let dvb_net_init return a meaningful error code, as preparation for
adapting callers to look at that instead.

The only immediate impact of this patch should be to make the few
callers that already check for an error code from dvb_net_init behave
a little more sensibly when it fails.

Signed-off-by: Jonathan Nieder <jrnieder@gmail.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2012-01-06 12:40:46 -02:00
..
demux.h V4L/DVB (8131): dmx_write: memcpy from user-supplied pointer 2008-07-20 07:13:27 -03:00
dmxdev.c [media] dmxdev: Fix a compilation warning due to a bad type 2010-12-29 08:17:13 -02:00
dmxdev.h include cleanup: Update gfp.h and slab.h includes to prepare for breaking implicit slab.h inclusion from percpu.h 2010-03-30 22:02:32 +09:00
dvb_ca_en50221.c BKL: remove extraneous #include <smp_lock.h> 2010-11-17 08:59:32 -08:00
dvb_ca_en50221.h V4L/DVB (9054): implement proper locking in the dvb ca en50221 driver 2009-01-29 08:35:37 -02:00
dvb_demux.c [media] Speed up DVB TS stream delivery from DMA buffer into dvb-core's buffer 2011-05-20 09:28:48 -03:00
dvb_demux.h V4L/DVB (13271): TS speed check. Logging transport stream speed in Kbits per second 2009-12-05 18:41:11 -02:00
dvb_filter.c
dvb_filter.h
dvb_frontend.c [media] dvb_frontend: improve documentation on set_delivery_system() 2012-01-05 16:44:07 -02:00
dvb_frontend.h [media] dvb: don't require a parameter for get_frontend 2011-12-31 10:28:23 -02:00
dvb_math.c
dvb_math.h
dvb_net.c [media] DVB: dvb_net_init: return -errno on error 2012-01-06 12:40:46 -02:00
dvb_net.h dvb_net: Simplify the code if DVB NET is not defined 2011-07-27 17:52:20 -03:00
dvb_ringbuffer.c V4L/DVB: DVB: Export dvb_ringbuffer_flush() again 2010-02-26 15:10:54 -03:00
dvb_ringbuffer.h V4L/DVB (8130): split dvb_ringbuffer dual-use functions 2008-07-20 07:13:23 -03:00
dvbdev.c Merge branch 'llseek' of git://git.kernel.org/pub/scm/linux/kernel/git/arnd/bkl 2010-10-22 10:52:56 -07:00
dvbdev.h dvb: Push down BKL into ioctl functions 2010-05-17 05:27:04 +02:00
Makefile [media] Make DVB NET configurable in the kernel 2011-07-27 17:52:20 -03:00