提交 a5d6839b 编写于 作者: A Adrian Bunk 提交者: 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: NAdrian Bunk <bunk@stusta.de>
Cc: "H. Peter Anvin" <hpa@zytor.com>
Cc: Neil Brown <neilb@cse.unsw.edu.au>
Signed-off-by: NAndrew Morton <akpm@osdl.org>
Signed-off-by: NLinus Torvalds <torvalds@osdl.org>
上级 226a6b84
......@@ -139,15 +139,14 @@ 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
raid6_call = *best;
} else
printk("raid6: Yikes! No algorithm found!\n");
raid6_call = *best;
free_pages((unsigned long)syndromes, 1);
return best ? 0 : -EINVAL;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册