atm: idt77252: Remove redundant error check
authorPeter Senna Tschudin <peter.senna@gmail.com>
Mon, 19 May 2014 10:26:52 +0000 (12:26 +0200)
committerDavid S. Miller <davem@davemloft.net>
Wed, 21 May 2014 19:56:26 +0000 (15:56 -0400)
Remove double checks, convert printk to pr_warn, and move the call to
pr_warn to the first check. The simplified version of the coccinelle
semantic patch that find this issue is as follows:

// <smpl>
@@
expression E; identifier pr; expression list es;
@@
while(...){
...
-       if (E) break;
+       if (E){
+               pr(es);
+               break;
+       }
...
}
- if(E) pr(es);
// </smpl>

Tested by compilation only.

Signed-off-by: Peter Senna Tschudin <peter.senna@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>

No differences found