aboutsummaryrefslogtreecommitdiffstats
path: root/kernel
diff options
context:
space:
mode:
authorHirofumi Nakagawa <hnakagawa@miraclelinux.com>2008-04-29 04:03:09 -0400
committerLinus Torvalds <torvalds@linux-foundation.org>2008-04-29 11:06:25 -0400
commit801678c5a3b4c79236970bcca27c733f5559e0d1 (patch)
tree5ad4761f539525077895f261b64fccda4d1303c4 /kernel
parent9a6f70bbed4e8b72dd340812d7c606bfd5e00b47 (diff)
Remove duplicated unlikely() in IS_ERR()
Some drivers have duplicated unlikely() macros. IS_ERR() already has unlikely() in itself. This patch cleans up such pointless code. Signed-off-by: Hirofumi Nakagawa <hnakagawa@miraclelinux.com> Acked-by: David S. Miller <davem@davemloft.net> Acked-by: Jeff Garzik <jeff@garzik.org> Cc: Paul Clements <paul.clements@steeleye.com> Cc: Richard Purdie <rpurdie@rpsys.net> Cc: Alessandro Zummo <a.zummo@towertech.it> Cc: David Brownell <david-b@pacbell.net> Cc: James Bottomley <James.Bottomley@HansenPartnership.com> Cc: Michael Halcrow <mhalcrow@us.ibm.com> Cc: Anton Altaparmakov <aia21@cantab.net> Cc: Al Viro <viro@zeniv.linux.org.uk> Cc: Carsten Otte <cotte@de.ibm.com> Cc: Patrick McHardy <kaber@trash.net> Cc: Paul Mundt <lethal@linux-sh.org> Cc: Jaroslav Kysela <perex@perex.cz> Cc: Takashi Iwai <tiwai@suse.de> Acked-by: Mike Frysinger <vapier@gentoo.org> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'kernel')
-rw-r--r--kernel/auditfilter.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/kernel/auditfilter.c b/kernel/auditfilter.c
index 28fef6bf8534..13430176b3c9 100644
--- a/kernel/auditfilter.c
+++ b/kernel/auditfilter.c
@@ -272,7 +272,7 @@ static int audit_to_watch(struct audit_krule *krule, char *path, int len,
272 return -EINVAL; 272 return -EINVAL;
273 273
274 watch = audit_init_watch(path); 274 watch = audit_init_watch(path);
275 if (unlikely(IS_ERR(watch))) 275 if (IS_ERR(watch))
276 return PTR_ERR(watch); 276 return PTR_ERR(watch);
277 277
278 audit_get_watch(watch); 278 audit_get_watch(watch);
@@ -848,7 +848,7 @@ static struct audit_watch *audit_dupe_watch(struct audit_watch *old)
848 return ERR_PTR(-ENOMEM); 848 return ERR_PTR(-ENOMEM);
849 849
850 new = audit_init_watch(path); 850 new = audit_init_watch(path);
851 if (unlikely(IS_ERR(new))) { 851 if (IS_ERR(new)) {
852 kfree(path); 852 kfree(path);
853 goto out; 853 goto out;
854 } 854 }
@@ -989,7 +989,7 @@ static void audit_update_watch(struct audit_parent *parent,
989 audit_set_auditable(current->audit_context); 989 audit_set_auditable(current->audit_context);
990 990
991 nwatch = audit_dupe_watch(owatch); 991 nwatch = audit_dupe_watch(owatch);
992 if (unlikely(IS_ERR(nwatch))) { 992 if (IS_ERR(nwatch)) {
993 mutex_unlock(&audit_filter_mutex); 993 mutex_unlock(&audit_filter_mutex);
994 audit_panic("error updating watch, skipping"); 994 audit_panic("error updating watch, skipping");
995 return; 995 return;
@@ -1004,7 +1004,7 @@ static void audit_update_watch(struct audit_parent *parent,
1004 list_del_rcu(&oentry->list); 1004 list_del_rcu(&oentry->list);
1005 1005
1006 nentry = audit_dupe_rule(&oentry->rule, nwatch); 1006 nentry = audit_dupe_rule(&oentry->rule, nwatch);
1007 if (unlikely(IS_ERR(nentry))) 1007 if (IS_ERR(nentry))
1008 audit_panic("error updating watch, removing"); 1008 audit_panic("error updating watch, removing");
1009 else { 1009 else {
1010 int h = audit_hash_ino((u32)ino); 1010 int h = audit_hash_ino((u32)ino);
@@ -1785,7 +1785,7 @@ int audit_update_lsm_rules(void)
1785 watch = entry->rule.watch; 1785 watch = entry->rule.watch;
1786 tree = entry->rule.tree; 1786 tree = entry->rule.tree;
1787 nentry = audit_dupe_rule(&entry->rule, watch); 1787 nentry = audit_dupe_rule(&entry->rule, watch);
1788 if (unlikely(IS_ERR(nentry))) { 1788 if (IS_ERR(nentry)) {
1789 /* save the first error encountered for the 1789 /* save the first error encountered for the
1790 * return value */ 1790 * return value */
1791 if (!err) 1791 if (!err)