]> pilppa.com Git - linux-2.6-omap-h63xx.git/commitdiff
[PATCH] Fix more "if ((err = foo() < 0))" typos
authorAlexey Dobriyan <adobriyan@gmail.com>
Mon, 9 Jan 2006 21:09:16 +0000 (00:09 +0300)
committerLinus Torvalds <torvalds@g5.osdl.org>
Mon, 9 Jan 2006 21:02:51 +0000 (13:02 -0800)
Another reason to use:

ret = foo();
if (ret < 0)
goto out;

Signed-off-by: Alexey Dobriyan <adobriyan@gmail.com>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Documentation/kprobes.txt
arch/mips/kernel/vpe.c
drivers/media/dvb/frontends/mt312.c

index 0541fe1de70482e74fa2f10c409130b1ac21ef4b..0ea5a0c6e8277f9691f21aed46edfa923d30adf4 100644 (file)
@@ -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;
        }
index 06be405be3999f44fe8e30135f73ffe6a0427d86..9c89eebc356febd946fc44c8dc3f5d41eed8d8d2 100644 (file)
@@ -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;
        }
index 8d672283c93de1ef15c3d500c1fd4896b8a03bb2..ec4e641acc64446db0f8577342652dd8614c2961 100644 (file)
@@ -501,7 +501,8 @@ static int mt312_set_frontend(struct dvb_frontend* fe,
        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
                {