diff mbox

[U-Boot,1/1] yaffs2: remove redundant condition

Message ID 20170415112813.17349-1-xypron.glpk@gmx.de
State Accepted
Commit 6568c731c47bfbb137183f8f745e8168604ea8ab
Delegated to: Tom Rini
Headers show

Commit Message

Heinrich Schuchardt April 15, 2017, 11:28 a.m. UTC
If !parent, the changed line is not reached.
So there is no need to check the value again.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
---
 fs/yaffs2/yaffsfs.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Tom Rini April 15, 2017, 4:11 p.m. UTC | #1
On Sat, Apr 15, 2017 at 01:28:13PM +0200, Heinrich Schuchardt wrote:

> If !parent, the changed line is not reached.
> So there is no need to check the value again.
> 
> Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>

Reviewed-by: Tom Rini <trini@konsulko.com>
Tom Rini April 19, 2017, 1:03 p.m. UTC | #2
On Sat, Apr 15, 2017 at 01:28:13PM +0200, xypron.glpk@gmx.de wrote:

> If !parent, the changed line is not reached.
> So there is no need to check the value again.
> 
> Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
> Reviewed-by: Tom Rini <trini@konsulko.com>

Applied to u-boot/master, thanks!
diff mbox

Patch

diff --git a/fs/yaffs2/yaffsfs.c b/fs/yaffs2/yaffsfs.c
index 41e5f0108c..ba76a5ccdb 100644
--- a/fs/yaffs2/yaffsfs.c
+++ b/fs/yaffs2/yaffsfs.c
@@ -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;