Browse Source

Merge git://git.denx.de/u-boot-ubi

Tom Rini 6 years ago
parent
commit
69d3226530
2 changed files with 5 additions and 10 deletions
  1. 1 2
      drivers/mtd/ubi/attach.c
  2. 4 8
      fs/ubifs/ubifs.c

+ 1 - 2
drivers/mtd/ubi/attach.c

@@ -1205,8 +1205,7 @@ static void destroy_ai(struct ubi_attach_info *ai)
 		}
 	}
 
-	if (ai->aeb_slab_cache)
-		kmem_cache_destroy(ai->aeb_slab_cache);
+	kmem_cache_destroy(ai->aeb_slab_cache);
 
 	kfree(ai);
 }

+ 4 - 8
fs/ubifs/ubifs.c

@@ -462,14 +462,10 @@ out:
 		dbg_gen("cannot find next direntry, error %d", err);
 
 out_free:
-	if (file->private_data)
-		kfree(file->private_data);
-	if (file)
-		free(file);
-	if (dentry)
-		free(dentry);
-	if (dir)
-		free(dir);
+	kfree(file->private_data);
+	free(file);
+	free(dentry);
+	free(dir);
 
 	return ret;
 }