[linux-dvb] [patch] dvb_net hotplugging support

Trent Piepho xyzzy at speakeasy.org
Fri Aug 17 23:15:52 CEST 2007


On Fri, 17 Aug 2007, Oliver Endriss wrote:
> Trent Piepho wrote:
> > On Fri, 17 Aug 2007, Oliver Endriss wrote:
> > > Markus Rechberger wrote:
> > > > Since this didn't get commented here, Trent did that patch already 2
> > > > months ago but it's not included yet. So I recommend to include his
> > > > patch.
> > > >
> > > > http://article.gmane.org/gmane.linux.kernel/543689
> > > >
> > > > Acked-by: Markus Rechberger <mrechberger at gmail.com>
> > >
> > > Are you talking about this tiny patch?
> > >
> > >  	struct dvb_net *dvbnet = dvbdev->priv;
> > >
> > > -	if (!dvbdev)
> > > -		return -ENODEV;
> > >
> > > If yes,
> > > Acked-by: Oliver Endriss <o.endriss at gmx.de>
> > >
> > > Btw, why is this patch important? Basically it doesn't change anything.
> >
> > It checks if dvbdev is NULL after dvbdev already been used.  Coverity spots
> > this as a programming mistake (which it is), and Adrian Bunk posts patches
> > to fix it.
>
> Sure, but the patch does exactly the same.
> It's just hidden behind a function call...

Exactly, now Coverity won't spot it!

Actually, it's not wrong anymore, since dvb_generic_open is used from
multiple places, so it could be called from somewhere else where dvbdev is
NULL and isn't used before the check.  Though I really doubt that dvbdev
can be NULL anywhere, so the check in dvb_generic_open can probably be
removed.



More information about the linux-dvb mailing list