aboutsummaryrefslogtreecommitdiff
path: root/drivers/char/ipmi
diff options
context:
space:
mode:
authorCorey Minyard <minyard@acm.org>2009-04-21 12:24:02 -0700
committerLinus Torvalds <torvalds@linux-foundation.org>2009-04-21 13:41:48 -0700
commit8b32b5d0dca2f5ab632e8bedcd57fe4c109c13fe (patch)
treef9a4aa93b52d4bb6a326c56974d186788e654cdd /drivers/char/ipmi
parent4614e6adafa2c5e6c3a9c245af2807fa7bc5117a (diff)
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 <minyard@acm.org> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'drivers/char/ipmi')
-rw-r--r--drivers/char/ipmi/ipmi_si_intf.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/char/ipmi/ipmi_si_intf.c b/drivers/char/ipmi/ipmi_si_intf.c
index e58ea4cd55c..2438fdf889b 100644
--- a/drivers/char/ipmi/ipmi_si_intf.c
+++ b/drivers/char/ipmi/ipmi_si_intf.c
@@ -2863,7 +2863,7 @@ static int try_smi_init(struct smi_info *new_smi)
*/
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");