Julia Lawall 4ecc8c066f drivers/net/fs_enet: remove null pointer dereference
The following code appears in the function fs_init_instance in the file drivers/net/fs_enet/fs_enet-main.c.

	if (fep->ops == NULL) {
		printk(KERN_ERR DRV_MODULE_NAME
		       ": %s No matching ops found (%d).\n",
		       ndev->name, fpi->fs_no);
		err = -EINVAL;
		goto err;
	}

This code implies that at the point of err, fep->ops can be NULL, so an
extra test is needed before dereferencing this value.

This problem was found using the following semantic match
(http://www.emn.fr/x-info/coccinelle/)

// <smpl>
@@
expression E, E1;
identifier f;
statement S1,S2,S3;
@@

* if (E == NULL)
{
  ... when != if (E == NULL) S1 else S2
      when != E = E1
* E->f
  ... when any
  return ...;
}
else S3
// </smpl>

Signed-off-by: Julia Lawall <julia@diku.dk>
Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
2008-05-22 06:26:28 -04:00
..
2008-05-13 01:30:25 -04:00
2008-01-28 15:10:29 -08:00
2008-05-13 01:31:37 -04:00
2008-03-26 00:18:44 -04:00
2008-05-22 06:19:27 -04:00
2008-05-20 22:40:31 -04:00
2008-03-17 08:11:03 -04:00
2008-01-28 15:04:05 -08:00
2008-01-28 15:07:12 -08:00
2007-10-10 16:51:57 -07:00
2008-03-26 00:18:43 -04:00
2007-11-05 17:57:30 -05:00
2008-01-28 15:07:12 -08:00
2007-10-10 16:55:27 -07:00
2008-01-28 15:03:59 -08:00
2008-03-26 00:18:43 -04:00
2008-05-22 06:20:14 -04:00
2007-10-10 16:51:43 -07:00
2008-04-29 01:56:14 -04:00
2008-01-31 19:27:17 -08:00
2008-05-02 16:58:18 -07:00
2008-02-28 11:51:50 -08:00
2008-02-28 11:51:50 -08:00
2008-02-28 11:57:55 -08:00
2008-01-04 00:47:04 -08:00
2008-05-22 06:20:02 -04:00
2008-03-26 00:18:43 -04:00
2008-01-18 14:44:33 -05:00
2008-02-01 20:54:03 +11:00
2007-10-10 16:51:13 -07:00
2008-04-29 08:06:27 -07:00
2007-10-10 16:51:13 -07:00
2008-01-28 15:07:59 -08:00
2008-04-29 01:56:01 -04:00
2008-03-05 18:51:19 -08:00
2007-10-19 11:53:42 -07:00
2008-05-01 08:08:36 -07:00
2008-04-29 08:06:27 -07:00
2008-01-28 15:07:12 -08:00
2008-02-03 04:26:12 -08:00
2007-10-10 16:50:46 -07:00
2008-03-17 08:11:41 -04:00
2008-01-28 15:05:53 -08:00
2008-05-13 01:31:39 -04:00
2008-04-25 02:08:51 -04:00
2008-01-28 15:04:05 -08:00
2008-01-28 15:07:12 -08:00
2007-10-10 16:51:13 -07:00
2008-01-28 15:07:12 -08:00
2007-10-19 11:53:42 -07:00
2008-02-03 04:28:10 -08:00
2008-03-17 07:56:33 -04:00
2008-03-26 00:18:04 -04:00
2008-03-26 00:18:00 -04:00
2007-10-23 21:28:40 -04:00
2008-01-28 15:07:56 -08:00
2008-03-05 16:34:41 -06:00
2008-05-22 06:03:29 -04:00
2008-01-28 15:11:27 -08:00
2008-01-28 15:08:00 -08:00
2008-03-17 07:56:27 -04:00
2008-01-28 15:03:59 -08:00
2007-10-15 14:29:48 -04:00
2008-04-16 20:41:44 -04:00
2008-05-22 06:18:55 -04:00
2008-04-27 18:19:08 +02:00
2008-01-28 15:03:59 -08:00
2007-10-16 21:10:29 -04:00
2008-05-13 01:31:44 -04:00
2008-01-28 15:11:27 -08:00
2008-04-30 08:29:47 -07:00
2008-01-28 15:03:59 -08:00
2008-04-16 20:06:50 -04:00
2007-10-10 16:51:13 -07:00
2008-02-03 04:26:15 -08:00
2008-01-28 15:03:46 -08:00
2008-03-23 03:35:12 -07:00
2008-01-28 15:07:10 -08:00
2008-01-28 15:07:12 -08:00
2008-01-28 15:07:09 -08:00
2008-02-03 04:26:14 -08:00
2008-04-17 15:31:31 -04:00
2007-10-10 16:51:34 -07:00
2007-10-10 16:51:34 -07:00
2008-05-02 16:49:50 -07:00
2008-04-25 02:45:23 -04:00