]> git.karo-electronics.de Git - karo-tx-linux.git/blobdiff - fs/udf/super.c
Merge tag 'staging-4.2-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh...
[karo-tx-linux.git] / fs / udf / super.c
index 6299f341967baf8e03b4e032b37eda524006e4ce..b96f190bc5679bfcc4740d770034352e0c956296 100644 (file)
@@ -927,17 +927,23 @@ static int udf_load_pvoldesc(struct super_block *sb, sector_t block)
 #endif
        }
 
-       if (!udf_build_ustr(instr, pvoldesc->volIdent, 32))
-               if (udf_CS0toUTF8(outstr, instr)) {
-                       strncpy(UDF_SB(sb)->s_volume_ident, outstr->u_name,
-                               outstr->u_len > 31 ? 31 : outstr->u_len);
-                       udf_debug("volIdent[] = '%s'\n",
-                                 UDF_SB(sb)->s_volume_ident);
-               }
+       if (!udf_build_ustr(instr, pvoldesc->volIdent, 32)) {
+               ret = udf_CS0toUTF8(outstr, instr);
+               if (ret < 0)
+                       goto out_bh;
+
+               strncpy(UDF_SB(sb)->s_volume_ident, outstr->u_name,
+                       outstr->u_len > 31 ? 31 : outstr->u_len);
+               udf_debug("volIdent[] = '%s'\n", UDF_SB(sb)->s_volume_ident);
+       }
 
-       if (!udf_build_ustr(instr, pvoldesc->volSetIdent, 128))
-               if (udf_CS0toUTF8(outstr, instr))
-                       udf_debug("volSetIdent[] = '%s'\n", outstr->u_name);
+       if (!udf_build_ustr(instr, pvoldesc->volSetIdent, 128)) {
+               ret = udf_CS0toUTF8(outstr, instr);
+               if (ret < 0)
+                       goto out_bh;
+
+               udf_debug("volSetIdent[] = '%s'\n", outstr->u_name);
+       }
 
        ret = 0;
 out_bh: