Skip to contentSkip to conversation

Staging: lustre: fix assignment in if condition in fsfilt.c

PATCH New Jon Bernard 1 participant 1 message Sep 13, 2013 Staging

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 Staging: lustre: fix assignment in if condition in fsfilt.c

This is a patch to the fsfilt.c file that fixes up three assignment in if condition errors found by the checkpatch.pl tool.

---
 drivers/staging/lustre/lustre/lvfs/fsfilt.c | 9 ++++++---
 1 file changed, 6 insertions(+), 3 deletions(-)
drivers/staging/lustre/lustre/lvfs/fsfilt.c +6 -3
index efc1e52..0d6ed69 100644
@@ -61,7 +61,8 @@ int fsfilt_register_ops(struct fsfilt_operations *fs_ops)
 	struct fsfilt_operations *found;
 
 	/* lock fsfilt_types list */
-	if ((found = fsfilt_search_type(fs_ops->fs_type))) {
+	found = fsfilt_search_type(fs_ops->fs_type);
+	if (found) {
 		if (found != fs_ops) {
 			CERROR("different operations for type %s\n",
 			       fs_ops->fs_type);
@@ -102,14 +103,16 @@ struct fsfilt_operations *fsfilt_get_ops(const char *type)
 	struct fsfilt_operations *fs_ops;
 
 	/* lock fsfilt_types list */
-	if (!(fs_ops = fsfilt_search_type(type))) {
+	fs_ops = fsfilt_search_type(type);
+	if (!fs_ops) {
 		char name[32];
 		int rc;
 
 		snprintf(name, sizeof(name) - 1, "fsfilt_%s", type);
 		name[sizeof(name) - 1] = '\0';
 
-		if (!(rc = request_module("%s", name))) {
+		rc = request_module("%s", name);
+		if (!rc) {
 			fs_ops = fsfilt_search_type(type);
 			CDEBUG(D_INFO, "Loaded module '%s'\n", name);
 			if (!fs_ops)
Signature · 1 line
1.8.4