Let iput() accept NULL pointers so that users do not have to test for
it.
Signed-off-by: Sascha Hauer <[email protected]>
---
fs/fs.c | 3 +++
1 file changed, 3 insertions(+)
diff --git a/fs/fs.c b/fs/fs.c
index d8389323aa..cecb3d70e0 100644
--- a/fs/fs.c
+++ b/fs/fs.c
@@ -1087,6 +1087,9 @@ void iget_failed(struct inode *inode)
void iput(struct inode *inode)
{
+ if (!inode)
+ return;
+
if (!inode->i_count)
return;
--
2.27.0
_______________________________________________
barebox mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/barebox