On Thu, Dec 01, 2016 at 12:32:32PM +0530, swati.dhin...@intel.com wrote:
> diff --git a/drivers/gpu/drm/drm_drv.c b/drivers/gpu/drm/drm_drv.c
> index 84fcfcb..ead360bd 100644
> --- a/drivers/gpu/drm/drm_drv.c
> +++ b/drivers/gpu/drm/drm_drv.c
> @@ -688,6 +688,14 @@ int drm_dev_register(struct drm_device *dev, unsigned 
> long flags)
>  {
>       int ret;
>  
> +#ifdef CONFIG_DRMFS

Rule of thumb: avoid #ifdeffry in the body of the code, use headers to
hide conditional compilation.

> +     dev->driver->drmfs_root = drmfs_create_dir(dev->driver->name, NULL);
> +     if (IS_ERR(dev->driver->drmfs_root)) {
> +             DRM_ERROR("Failed to get drmfs root dentry\n");
> +             return PTR_ERR(dev->driver->drmfs_root);
> +     }

Considering use of drmfs is optional, should an error here prevent the
driver from loading?
-Chris

-- 
Chris Wilson, Intel Open Source Technology Centre
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

Reply via email to