diff --git a/drivers/pps/pps.c b/drivers/pps/pps.c index 98fbe62694d4eddbead50fde0de22fe834ce67a4..e771487132f7542123a0e8a669cd8582481ab051 100644 --- a/drivers/pps/pps.c +++ b/drivers/pps/pps.c @@ -327,8 +327,10 @@ int pps_register_cdev(struct pps_device *pps) } pps->dev = device_create(pps_class, pps->info.dev, devt, pps, "pps%d", pps->id); - if (IS_ERR(pps->dev)) + if (IS_ERR(pps->dev)) { + err = PTR_ERR(pps->dev); goto del_cdev; + } pps->dev->release = pps_device_destruct;