Commit afc3c161 authored by Federico Vaga's avatar Federico Vaga

bus.c: verify if template exists on driver register

Signed-off-by: 's avatarFederico Vaga <federico.vaga@gmail.com>
Acked-by: Alessandro Rubini's avatarAlessandro Rubini <rubini@gnudd.com>
parent d90fe8d1
......@@ -205,6 +205,11 @@ static int _zdev_template_check_and_init(struct zio_device *zdev,
int i;
pr_debug("%s:%d\n", __func__, __LINE__);
if (!zdev) {
pr_err("%s:%d missing zio_device template\n",
__func__, __LINE__);
return -EINVAL;
}
if (!zdev->owner) {
/* FIXME I can use driver->owner */
dev_err(&zdev->head.dev, "device template %s has no owner\n",
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment