/*
* get references of ancestors that include @child until the count of
- * ancesters is not larger than @count and the count of characters of
+ * ancestors is not larger than @count and the count of characters of
* their names is not larger than @max_char_len.
* return true if root is reached.
*/
shift += 10;
}
+ if (i >= sizeof(units)/sizeof(units[0])) {
+ i = i - 1;
+ shift = shift - 10;
+ }
+
quoti = (unsigned int)(bytes / (1ULL << shift));
remain = 0;
if (shift > 0) {
goto err;
ret = init_exfat(exfat, bs);
- if (ret)
+ if (ret) {
+ exfat = NULL;
goto err;
+ }
if (exfat_mark_volume_dirty(exfat, true)) {
ret = -EIO;