From: Andrew Morton <[email-masked]>

commit 8b32b5d0dca2f5ab632e8bedcd57fe4c109c13fe
Author: Corey Minyard <[email-masked]>
Date:   Tue Apr 21 12:24:02 2009 -0700

    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.
    
    Signed-off-by: Corey Minyard <[email-masked]>
    Signed-off-by: Andrew Morton <[email-masked]>
    Signed-off-by: Linus Torvalds <[email-masked]>

Signed-off-by: Andrew Morton <[email-masked]>
---

 drivers/char/ipmi/ipmi_si_intf.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff -puN drivers/char/ipmi/ipmi_si_intf.c~revert-4 drivers/char/ipmi/ipmi_si_intf.c
--- a/drivers/char/ipmi/ipmi_si_intf.c~revert-4
+++ a/drivers/char/ipmi/ipmi_si_intf.c
@@ -2863,7 +2863,7 @@ static int try_smi_init(struct smi_info 
 		 */
 		new_smi->pdev = platform_device_alloc("ipmi_si",
 						      new_smi->intf_num);
-		if (!new_smi->pdev) {
+		if (rv) {
 			printk(KERN_ERR
 			       "ipmi_si_intf:"
 			       " Unable to allocate platform device\n");
_