Commit a5d6839b authored by Adrian Bunk's avatar Adrian Bunk Committed by Linus Torvalds

[PATCH] drivers/md/raid6algos.c: fix a NULL dereference

This patch fixes a NULL dereference spotted by the Coverity checker.
Signed-off-by: default avatarAdrian Bunk <bunk@stusta.de>
Cc: "H. Peter Anvin" <hpa@zytor.com>
Cc: Neil Brown <neilb@cse.unsw.edu.au>
Signed-off-by: default avatarAndrew Morton <akpm@osdl.org>
Signed-off-by: default avatarLinus Torvalds <torvalds@osdl.org>
parent 226a6b84
......@@ -139,14 +139,13 @@ int __init raid6_select_algo(void)
}
}
if ( best )
if (best) {
printk("raid6: using algorithm %s (%ld MB/s)\n",
best->name,
(bestperf*HZ) >> (20-16+RAID6_TIME_JIFFIES_LG2));
else
printk("raid6: Yikes! No algorithm found!\n");
raid6_call = *best;
} else
printk("raid6: Yikes! No algorithm found!\n");
free_pages((unsigned long)syndromes, 1);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment