Skip to contentSkip to conversation

IPMI: Fix platform return check

PATCH In review Corey Minyard 1 participant 1 message Mar 3, 2009 IPMI

lore
Share & tools
lore
#0 lore raw

PATCH 1/5 IPMI: Fix platform return check

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

---

drivers/char/ipmi/ipmi_si_intf.c +1 -1
Index: 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");