[PATCH 1/5] IPMI: Fix platform return check

From: Corey Minyard
Date: Tue Mar 03 2009 - 10:18:33 EST


The wrong return value is being tested when allocating a platform
device in the IPMI SI code. Check the right value.

Signed-off-by: Corey Minyard <minyard@xxxxxxx>
---
Index: linux-2.6.25/drivers/char/ipmi/ipmi_si_intf.c
===================================================================
--- linux-2.6.25.orig/drivers/char/ipmi/ipmi_si_intf.c
+++ linux-2.6.25/drivers/char/ipmi/ipmi_si_intf.c
@@ -2864,7 +2864,7 @@ static int try_smi_init(struct smi_info
*/
new_smi->pdev = platform_device_alloc("ipmi_si",
new_smi->intf_num);
- if (rv) {
+ if (!new_smi->pdev) {
printk(KERN_ERR
"ipmi_si_intf:"
" Unable to allocate platform device\n");
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/