Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit f36108c4 authored by Greg Kroah-Hartman's avatar Greg Kroah-Hartman Committed by Martin Schwidefsky
Browse files

s390/hypfs: no need to check return value of debugfs_create functions



When calling debugfs functions, there is no need to ever check the
return value.  The function can work or not, but the code logic should
never do something different based on this.

Cc: Martin Schwidefsky <schwidefsky@de.ibm.com>
Cc: Heiko Carstens <heiko.carstens@de.ibm.com>
Cc: linux-s390@vger.kernel.org
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: default avatarHeiko Carstens <heiko.carstens@de.ibm.com>
Signed-off-by: default avatarMartin Schwidefsky <schwidefsky@de.ibm.com>
parent 4ad78b86
Loading
Loading
Loading
Loading
+3 −3
Original line number Original line Diff line number Diff line
@@ -43,7 +43,7 @@ int hypfs_diag0c_init(void);
void hypfs_diag0c_exit(void);
void hypfs_diag0c_exit(void);


/* Set Partition-Resource Parameter */
/* Set Partition-Resource Parameter */
int hypfs_sprp_init(void);
void hypfs_sprp_init(void);
void hypfs_sprp_exit(void);
void hypfs_sprp_exit(void);


/* debugfs interface */
/* debugfs interface */
@@ -69,9 +69,9 @@ struct hypfs_dbfs_file {
	struct dentry		*dentry;
	struct dentry		*dentry;
};
};


extern int hypfs_dbfs_init(void);
extern void hypfs_dbfs_init(void);
extern void hypfs_dbfs_exit(void);
extern void hypfs_dbfs_exit(void);
extern int hypfs_dbfs_create_file(struct hypfs_dbfs_file *df);
extern void hypfs_dbfs_create_file(struct hypfs_dbfs_file *df);
extern void hypfs_dbfs_remove_file(struct hypfs_dbfs_file *df);
extern void hypfs_dbfs_remove_file(struct hypfs_dbfs_file *df);


#endif /* _HYPFS_H_ */
#endif /* _HYPFS_H_ */
+2 −6
Original line number Original line Diff line number Diff line
@@ -78,14 +78,11 @@ static const struct file_operations dbfs_ops = {
	.unlocked_ioctl = dbfs_ioctl,
	.unlocked_ioctl = dbfs_ioctl,
};
};


int hypfs_dbfs_create_file(struct hypfs_dbfs_file *df)
void hypfs_dbfs_create_file(struct hypfs_dbfs_file *df)
{
{
	df->dentry = debugfs_create_file(df->name, 0400, dbfs_dir, df,
	df->dentry = debugfs_create_file(df->name, 0400, dbfs_dir, df,
					 &dbfs_ops);
					 &dbfs_ops);
	if (IS_ERR(df->dentry))
		return PTR_ERR(df->dentry);
	mutex_init(&df->lock);
	mutex_init(&df->lock);
	return 0;
}
}


void hypfs_dbfs_remove_file(struct hypfs_dbfs_file *df)
void hypfs_dbfs_remove_file(struct hypfs_dbfs_file *df)
@@ -93,10 +90,9 @@ void hypfs_dbfs_remove_file(struct hypfs_dbfs_file *df)
	debugfs_remove(df->dentry);
	debugfs_remove(df->dentry);
}
}


int hypfs_dbfs_init(void)
void hypfs_dbfs_init(void)
{
{
	dbfs_dir = debugfs_create_dir("s390_hypfs", NULL);
	dbfs_dir = debugfs_create_dir("s390_hypfs", NULL);
	return PTR_ERR_OR_ZERO(dbfs_dir);
}
}


void hypfs_dbfs_exit(void)
void hypfs_dbfs_exit(void)
+4 −5
Original line number Original line Diff line number Diff line
@@ -440,11 +440,10 @@ __init int hypfs_diag_init(void)
		pr_err("The hardware system does not support hypfs\n");
		pr_err("The hardware system does not support hypfs\n");
		return -ENODATA;
		return -ENODATA;
	}
	}
	if (diag204_info_type == DIAG204_INFO_EXT) {

		rc = hypfs_dbfs_create_file(&dbfs_file_d204);
	if (diag204_info_type == DIAG204_INFO_EXT)
		if (rc)
		hypfs_dbfs_create_file(&dbfs_file_d204);
			return rc;

	}
	if (MACHINE_IS_LPAR) {
	if (MACHINE_IS_LPAR) {
		rc = diag224_get_name_table();
		rc = diag224_get_name_table();
		if (rc) {
		if (rc) {
+2 −1
Original line number Original line Diff line number Diff line
@@ -124,7 +124,8 @@ int __init hypfs_diag0c_init(void)
{
{
	if (!MACHINE_IS_VM)
	if (!MACHINE_IS_VM)
		return 0;
		return 0;
	return hypfs_dbfs_create_file(&dbfs_file_0c);
	hypfs_dbfs_create_file(&dbfs_file_0c);
	return 0;
}
}


/*
/*
+3 −3
Original line number Original line Diff line number Diff line
@@ -137,11 +137,11 @@ static struct hypfs_dbfs_file hypfs_sprp_file = {
	.unlocked_ioctl = hypfs_sprp_ioctl,
	.unlocked_ioctl = hypfs_sprp_ioctl,
};
};


int hypfs_sprp_init(void)
void hypfs_sprp_init(void)
{
{
	if (!sclp.has_sprp)
	if (!sclp.has_sprp)
		return 0;
		return;
	return hypfs_dbfs_create_file(&hypfs_sprp_file);
	hypfs_dbfs_create_file(&hypfs_sprp_file);
}
}


void hypfs_sprp_exit(void)
void hypfs_sprp_exit(void)
Loading