kernel_optimize_test/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
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
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
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
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