You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@nuttx.apache.org by "xiaoxiang781216 (via GitHub)" <gi...@apache.org> on 2023/05/24 16:25:26 UTC

[GitHub] [nuttx] xiaoxiang781216 commented on a diff in pull request #9347: fs/partition: register partition device if caller doesn't provide handler

xiaoxiang781216 commented on code in PR #9347:
URL: https://github.com/apache/nuttx/pull/9347#discussion_r1204475895


##########
fs/driver/fs_blockpartition.c:
##########
@@ -366,14 +357,43 @@ int register_blockpartition(FAR const char *partition,
   ret = register_blockdriver(partition, &g_part_bops, mode, dev);
   if (ret < 0)
     {
-      goto errout_release;
+      goto errout_free;
     }
 
   return OK;
 
-errout_release:
-  inode_release(dev->parent);
 errout_free:
+  inode_release(parent);
   kmm_free(dev);
   return ret;
 }
+

Review Comment:
   since both functions are similar, they share the same comment here:
   https://github.com/apache/nuttx/pull/9347/files#diff-ab5dfc7f5f96322da067b0ef28ca492f679dfac924852c7442592feec6696f28R296-R306 



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@nuttx.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org