ptp: ocp: Report error if resource registration fails.

If a resource could not be registered, report the name of
the resource and the error code.

Signed-off-by: Jonathan Lemon <jonathan.lemon@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
Jonathan Lemon 2021-09-14 19:16:23 -07:00 коммит произвёл David S. Miller
Родитель 56ec44033c
Коммит bceff2905e
1 изменённых файлов: 5 добавлений и 1 удалений

Просмотреть файл

@ -1158,8 +1158,12 @@ ptp_ocp_register_resources(struct ptp_ocp *bp, kernel_ulong_t driver_data)
if (!ptp_ocp_allow_irq(bp, r))
continue;
err = r->setup(bp, r);
if (err)
if (err) {
dev_err(&bp->pdev->dev,
"Could not register %s: err %d\n",
r->name, err);
break;
}
}
return err;
}