Beispiel #1
0
static int pcifront_xenbus_probe(struct xenbus_device *xdev,
				 const struct xenbus_device_id *id)
{
	int err = 0;
	struct pcifront_device *pdev = alloc_pdev(xdev);

	if (pdev == NULL) {
		err = -ENOMEM;
		xenbus_dev_fatal(xdev, err,
				 "Error allocating pcifront_device struct");
		goto out;
	}

	err = pcifront_publish_info(pdev);

      out:
	return err;
}
Beispiel #2
0
/* Process a probe from the xenbus */
static int
pcifront_probe(struct xenbus_device *xdev,
			   const struct xenbus_device_id *id)
{
	int err = 0;
	struct pcifront_device *pdev;

	DPRINTF("xenbus probing\n");

	if ((pdev = alloc_pdev(xdev)) == NULL)
		goto out;

	err = pcifront_publish_info(pdev);

 out:
	if (err)
		put_pdev(pdev);
	return err;
}