Re: [PATCH v3 14/15] habanalabs: add debugfs support

From: Greg KH
Date: Fri Feb 08 2019 - 07:16:09 EST


On Mon, Feb 04, 2019 at 10:32:53PM +0200, Oded Gabbay wrote:
> +int __init hl_debugfs_init(void)
> +{
> + hl_debug_root = debugfs_create_dir("habanalabs", NULL);
> + if (IS_ERR_OR_NULL(hl_debug_root)) {
> + pr_err("can not create debugfs directory\n");
> + hl_debug_root = NULL;
> + return -ENOMEM;
> + }
> +
> + return 0;
> +}

This function should just be one line:
void __init hl_debugfs_init(void)
{
hl_debug_root = debugfs_create_dir("habanalabs", NULL);
}

No need to do anything else, or check anything.

thanks,

greg k-h