linux-fsdevel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] fs/seq_file: remove some dead code
@ 2017-05-20  9:49 Dan Carpenter
  2017-05-23 16:58 ` Andreas Dilger
  0 siblings, 1 reply; 2+ messages in thread
From: Dan Carpenter @ 2017-05-20  9:49 UTC (permalink / raw)
  To: Alexander Viro; +Cc: linux-fsdevel, kernel-janitors

We have never used this "err = PTR_ERR(p);" assignment and it annoys
static checkers.

Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>

diff --git a/fs/seq_file.c b/fs/seq_file.c
index 13e8c092d4d2..d6f82ce288f4 100644
--- a/fs/seq_file.c
+++ b/fs/seq_file.c
@@ -261,10 +261,8 @@ ssize_t seq_read(struct file *file, char __user *buf, size_t size, loff_t *ppos)
 		size_t offs = m->count;
 		loff_t next = pos;
 		p = m->op->next(m, p, &next);
-		if (!p || IS_ERR(p)) {
-			err = PTR_ERR(p);
+		if (!p || IS_ERR(p))
 			break;
-		}
 		err = m->op->show(m, p);
 		if (seq_has_overflowed(m) || err) {
 			m->count = offs;

^ permalink raw reply related	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2017-05-23 16:58 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-05-20  9:49 [PATCH] fs/seq_file: remove some dead code Dan Carpenter
2017-05-23 16:58 ` Andreas Dilger

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).