yaffs2: remove redundant condition
PATCH 1/1 yaffs2: remove redundant condition
If !parent, the changed line is not reached.
So there is no need to check the value again.
Signed-off-by Heinrich Schuchardt <[email protected]>
--- fs/yaffs2/yaffsfs.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
fs/yaffs2/yaffsfs.c +1 -1
@@ -3018,7 +3018,7 @@ int yaffs_symlink(const YCHAR *oldpath, const YCHAR *newpath)yaffsfs_SetError (-ENFILE ); else if (parent->my_dev->read_only) yaffsfs_SetError(-EROFS); - else if (parent) { + else { obj =yaffs_create_symlink (parent, name, mode,0 ,0 , oldpath);if (obj) retVal =0 ;
Signature · 1 line
2.11.0
PATCH 1/1 yaffs2: remove redundant condition
Quoted 4 lines · Heinrich Schuchardt
If !parent, the changed line is not reached.
So there is no need to check the value again.Signed-off-by Heinrich Schuchardt <[email protected]>
Reviewed-by Tom Rini <[email protected]>
Signature · 8 lines
Tom -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 819 bytes Desc: Digital signature URL: <http://lists.denx.de/pipermail/u-boot/attachments/20170415/98009b7e/attachment.sig>
PATCH 1/1 yaffs2: remove redundant condition
In reply to Heinrich SchuchardtQuoted 5 lines · xypron.glpk at gmx.de
If !parent, the changed line is not reached.
So there is no need to check the value again.Signed-off-by Heinrich Schuchardt <[email protected]>Reviewed-by Tom Rini <[email protected]>
Applied to u-boot/master, thanks!
Signature · 8 lines
Tom -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 819 bytes Desc: Digital signature URL: <http://lists.denx.de/pipermail/u-boot/attachments/20170419/fe55653f/attachment.sig>