[2.6 patch] dvb_frontend_ioctl(): fix check-after-use

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



The Coverity checker spotted that we have already oops'ed if "fe" was NULL.

Since "fe" being NULL seems impossible at this point this patch removes 
the NULL check.

Signed-off-by: Adrian Bunk <[email protected]>

---
--- linux-2.6.23-rc1-mm1/drivers/media/dvb/dvb-core/dvb_frontend.c.old	2007-07-29 21:41:56.000000000 +0200
+++ linux-2.6.23-rc1-mm1/drivers/media/dvb/dvb-core/dvb_frontend.c	2007-07-29 21:42:16.000000000 +0200
@@ -706,11 +706,11 @@ static int dvb_frontend_ioctl(struct ino
 	struct dvb_frontend_private *fepriv = fe->frontend_priv;
 	int err = -EOPNOTSUPP;
 
 	dprintk ("%s\n", __FUNCTION__);
 
-	if (!fe || fepriv->exit)
+	if (fepriv->exit)
 		return -ENODEV;
 
 	if ((file->f_flags & O_ACCMODE) == O_RDONLY &&
 	    (_IOC_DIR(cmd) != _IOC_READ || cmd == FE_GET_EVENT ||
 	     cmd == FE_DISEQC_RECV_SLAVE_REPLY))

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

[Index of Archives]     [Kernel Newbies]     [Netfilter]     [Bugtraq]     [Photo]     [Stuff]     [Gimp]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Video 4 Linux]     [Linux for the blind]     [Linux Resources]
  Powered by Linux