diff options
author | Adrian Bunk <bunk@stusta.de> | 2006-06-23 05:05:59 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@g5.osdl.org> | 2006-06-23 10:43:08 -0400 |
commit | a5d6839b75ca4a29b5e0a5595914a8715e8f746d (patch) | |
tree | 8bb38547046d71b42b687e7c07350fe02d9b3d63 | |
parent | 226a6b84aaaf1fac7a5d41cf4e7387fd9ba895d5 (diff) |
[PATCH] drivers/md/raid6algos.c: fix a NULL dereference
This patch fixes a NULL dereference spotted by the Coverity checker.
Signed-off-by: Adrian Bunk <bunk@stusta.de>
Cc: "H. Peter Anvin" <hpa@zytor.com>
Cc: Neil Brown <neilb@cse.unsw.edu.au>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
-rw-r--r-- | drivers/md/raid6algos.c | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/drivers/md/raid6algos.c b/drivers/md/raid6algos.c index 51c63c0cf1c9..926576156578 100644 --- a/drivers/md/raid6algos.c +++ b/drivers/md/raid6algos.c | |||
@@ -139,15 +139,14 @@ int __init raid6_select_algo(void) | |||
139 | } | 139 | } |
140 | } | 140 | } |
141 | 141 | ||
142 | if ( best ) | 142 | if (best) { |
143 | printk("raid6: using algorithm %s (%ld MB/s)\n", | 143 | printk("raid6: using algorithm %s (%ld MB/s)\n", |
144 | best->name, | 144 | best->name, |
145 | (bestperf*HZ) >> (20-16+RAID6_TIME_JIFFIES_LG2)); | 145 | (bestperf*HZ) >> (20-16+RAID6_TIME_JIFFIES_LG2)); |
146 | else | 146 | raid6_call = *best; |
147 | } else | ||
147 | printk("raid6: Yikes! No algorithm found!\n"); | 148 | printk("raid6: Yikes! No algorithm found!\n"); |
148 | 149 | ||
149 | raid6_call = *best; | ||
150 | |||
151 | free_pages((unsigned long)syndromes, 1); | 150 | free_pages((unsigned long)syndromes, 1); |
152 | 151 | ||
153 | return best ? 0 : -EINVAL; | 152 | return best ? 0 : -EINVAL; |