lkml.org 
[lkml]   [2019]   [Jan]   [22]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH 1/5] mips: cavium: no need to check return value of debugfs_create functions
Hi,

On Tue, Jan 22, 2019 at 03:57:38PM +0100, Greg Kroah-Hartman wrote:
> -static int init_debufs(void)
> +static void init_debugfs(void)
> {
> - struct dentry *show_dentry;
> dir = debugfs_create_dir("oct_ilm", 0);
> - if (!dir) {
> - pr_err("oct_ilm: failed to create debugfs entry oct_ilm\n");
> - return -1;
> - }
> -
> - show_dentry = debugfs_create_file("statistics", 0222, dir, NULL,
> - &oct_ilm_ops);
> - if (!show_dentry) {
> - pr_err("oct_ilm: failed to create debugfs entry oct_ilm/statistics\n");
> - return -1;
> - }
> -
> - show_dentry = debugfs_create_file("reset", 0222, dir, NULL,
> - &reset_statistics_ops);
> - if (!show_dentry) {
> - pr_err("oct_ilm: failed to create debugfs entry oct_ilm/reset\n");
> - return -1;
> - }
> -
> + debugfs_create_file("statistics", 0222, dir, NULL, &oct_ilm_ops);
> + debugfs_create_file("reset", 0222, dir, NULL, &reset_statistics_ops);
> return 0;

The return needs to be deleted now that the function is void.

A.

\
 
 \ /
  Last update: 2019-01-22 19:49    [W:1.030 / U:0.112 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site