From: Alexey Dobriyan <adobriyan@gmail.com>
To: Kirill Korotaev <dev@openvz.org>
Cc: Linus Torvalds <torvalds@osdl.org>, Andrew Morton <akpm@osdl.org>,
linux-kernel@vger.kernel.org, Dmitry Mishin <dim@sw.ru>,
Stanislav Protassov <st@sw.ru>
Subject: [PATCH] Fix more "if ((err = foo() < 0))" typos
Date: Tue, 10 Jan 2006 00:09:16 +0300 [thread overview]
Message-ID: <20060109210916.GA28806@mipter.zuzino.mipt.ru> (raw)
In-Reply-To: <43C27662.2030400@openvz.org>
Another reason to use:
ret = foo();
if (ret < 0)
goto out;
Signed-off-by: Alexey Dobriyan <adobriyan@gmail.com>
---
Documentation/kprobes.txt | 3 ++-
arch/mips/kernel/vpe.c | 3 ++-
drivers/media/dvb/frontends/mt312.c | 3 ++-
3 files changed, 6 insertions(+), 3 deletions(-)
diff -uprN linux-vanilla/Documentation/kprobes.txt linux-1/Documentation/kprobes.txt
--- linux-vanilla/Documentation/kprobes.txt 2006-01-09 16:02:19.000000000 +0300
+++ linux-1/Documentation/kprobes.txt 2006-01-09 23:59:12.000000000 +0300
@@ -411,7 +411,8 @@ int init_module(void)
printk("Couldn't find %s to plant kprobe\n", "do_fork");
return -1;
}
- if ((ret = register_kprobe(&kp) < 0)) {
+ ret = register_kprobe(&kp);
+ if (ret < 0) {
printk("register_kprobe failed, returned %d\n", ret);
return -1;
}
diff -uprN linux-vanilla/arch/mips/kernel/vpe.c linux-1/arch/mips/kernel/vpe.c
--- linux-vanilla/arch/mips/kernel/vpe.c 2006-01-09 16:02:20.000000000 +0300
+++ linux-1/arch/mips/kernel/vpe.c 2006-01-10 00:00:35.000000000 +0300
@@ -1171,7 +1171,8 @@ static int __init vpe_module_init(void)
return -ENODEV;
}
- if ((major = register_chrdev(0, module_name, &vpe_fops) < 0)) {
+ major = register_chrdev(0, module_name, &vpe_fops);
+ if (major < 0) {
printk("VPE loader: unable to register character device\n");
return major;
}
diff -uprN linux-vanilla/drivers/media/dvb/frontends/mt312.c linux-1/drivers/media/dvb/frontends/mt312.c
--- linux-vanilla/drivers/media/dvb/frontends/mt312.c 2006-01-09 16:02:22.000000000 +0300
+++ linux-1/drivers/media/dvb/frontends/mt312.c 2006-01-09 23:59:46.000000000 +0300
@@ -501,7 +501,8 @@ static int mt312_set_frontend(struct dvb
case ID_VP310:
// For now we will do this only for the VP310.
// It should be better for the mt312 as well, but tunning will be slower. ACCJr 09/29/03
- if ((ret = mt312_readreg(state, CONFIG, &config_val) < 0))
+ ret = mt312_readreg(state, CONFIG, &config_val);
+ if (ret < 0)
return ret;
if (p->u.qpsk.symbol_rate >= 30000000) //Note that 30MS/s should use 90MHz
{
next prev parent reply other threads:[~2006-01-09 20:52 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-01-09 14:42 [PATCH] netlink oops fix due to incorrect error code Kirill Korotaev
2006-01-09 21:09 ` Alexey Dobriyan [this message]
2006-01-09 23:50 ` Patrick McHardy
2006-01-09 23:54 ` David S. Miller
2006-01-10 8:38 ` [stable] " Chris Wright
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20060109210916.GA28806@mipter.zuzino.mipt.ru \
--to=adobriyan@gmail.com \
--cc=akpm@osdl.org \
--cc=dev@openvz.org \
--cc=dim@sw.ru \
--cc=linux-kernel@vger.kernel.org \
--cc=st@sw.ru \
--cc=torvalds@osdl.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).