login
Login
/
Register
Search
Search this site:
Forums
News
Blogs
Features
Site
Home
»
Mailing list archives
»
linux-kernel
»
2007
»
October
»
9
Re: [PATCH v4] IBM power meter driver
view
thread
Previous message: [
thread
] [
date
] [
author
]
Next message: [
thread
] [
date
] [
author
]
[view in full thread]
From: Roel Kluin
Subject:
Re: [PATCH v4] IBM power meter driver
Date: Tuesday, October 9, 2007 - 9:44 am
Mark M. Hoffman wrote:
quoted text
>> +static void ibmpex_register_bmc(int iface, struct device *dev) >> +{ >> + struct ibmpex_bmc_data *data; >> + int err; >> + >> + data = kzalloc(sizeof(*data), GFP_KERNEL); >> + if (!data) { >> + printk(KERN_ERR DRVNAME ": Insufficient memory for BMC " >> + "interface %d.\n", data->interface); >> + return; >> + } >> + >> + data->address.addr_type = IPMI_SYSTEM_INTERFACE_ADDR_TYPE; >> + data->address.channel = IPMI_BMC_CHANNEL; >> + data->address.data[0] = 0; >> + data->interface = iface; >> + data->bmc_device = dev; >> + >> + /* Create IPMI messaging interface user */ >> + err = ipmi_create_user(data->interface, &driver_data.ipmi_hndlrs, >> + data, &data->user); >> + if (err < 0) { >> + printk(KERN_ERR DRVNAME ": Error, unable to register user with " >> + "ipmi interface %d\n", >> + data->interface); >> + goto out; >> + } >> + >> + mutex_init(&data->lock); >> + >> + /* Initialize message */ >> + data->tx_msgid = 0; >> + init_completion(&data->read_complete); >> + data->tx_message.netfn = PEX_NET_FUNCTION; >> + data->tx_message.cmd = PEX_COMMAND; >> + data->tx_message.data = data->tx_msg_data; >> + >> + /* Does this BMC support PowerExecutive? */ >> + err = ibmpex_ver_check(data); >> + if (err) >> + goto out_user; >> + >> + /* Register the BMC as a HWMON class device */ >> + data->hwmon_dev = hwmon_device_register(data->bmc_device); >> + >> + if (IS_ERR(data->hwmon_dev)) { >> + printk(KERN_ERR DRVNAME ": Error, unable to register hwmon " >> + "class device for interface %d\n", >> + data->interface); >> + kfree(data); >> + return;
don't you want to goto out_user here instead?
quoted text
>> + } >> + >> + /* finally add the new bmc data to the bmc data list */ >> + dev_set_drvdata(dev, data); >> + list_add_tail(&data->list, &driver_data.bmc_data); >> + >> + /* Now go find all the sensors */ >> + err = ibmpex_find_sensors(data); >> + if (err) { >> + printk(KERN_ERR "Error %d allocating memory\n", err); >> + goto out_register; >> + } >> + >> + return; >> + >> +out_register: >> + hwmon_device_unregister(data->hwmon_dev); >> +out_user: >> + ipmi_destroy_user(data->user); >> +out: >> + kfree(data); >> +}
-
unsubscribe notice
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to
majordomo@vger.kernel.org
More majordomo info at
http://vger.kernel.org/majordomo-info.html
Please read the FAQ at
http://www.tux.org/lkml/
Previous message: [
thread
] [
date
] [
author
]
Next message: [
thread
] [
date
] [
author
]
Messages in current thread:
[PATCH] v1 of IBM power meter driver
, Darrick J. Wong
, (Mon Aug 27, 2:14 pm)
Re: [PATCH] v1 of IBM power meter driver
, Henrique de Moraes H ...
, (Mon Aug 27, 6:50 pm)
Re: [lm-sensors] [PATCH] v1 of IBM power meter driver
, Jean Delvare
, (Tue Aug 28, 4:19 am)
Re: [lm-sensors] [PATCH] v1 of IBM power meter driver
, Darrick J. Wong
, (Tue Aug 28, 9:28 am)
[PATCH] hwmon: Add power meters to Documentation/hwmon/sys ...
, Darrick J. Wong
, (Tue Aug 28, 9:44 am)
[PATCH] v2 of IBM power meter driver
, Darrick J. Wong
, (Tue Aug 28, 9:49 am)
[PATCH] v3 of IBM power meter driver
, Darrick J. Wong
, (Tue Aug 28, 4:25 pm)
Re: [PATCH] hwmon: Add power meters to Documentation/hwmon ...
, Jean Delvare
, (Wed Aug 29, 2:10 am)
Re: [lm-sensors] [PATCH] v1 of IBM power meter driver
, Jean Delvare
, (Wed Aug 29, 2:49 am)
Re: [lm-sensors] [PATCH] v1 of IBM power meter driver
, Frank Phillips
, (Wed Aug 29, 5:45 am)
Re: [PATCH] hwmon: Add power meters to Documentation/hwmon ...
, Darrick J. Wong
, (Wed Aug 29, 7:50 am)
Re: [PATCH] hwmon: Add power meters to Documentation/hwmon ...
, Jean Delvare
, (Thu Aug 30, 2:57 am)
Re: [PATCH] hwmon: Add power meters to Documentation/hwmon ...
, Pavel Machek
, (Sat Sep 1, 10:10 am)
Re: [PATCH] hwmon: Add power meters to Documentation/hwmon ...
, Shem Multinymous
, (Sat Sep 1, 11:05 am)
Re: [lm-sensors] [PATCH] hwmon: Add power meters to Docume ...
, Henrique de Moraes H ...
, (Sat Sep 1, 12:44 pm)
Re: [lm-sensors] [PATCH] hwmon: Add power meters to Docume ...
, Jean Delvare
, (Sun Sep 2, 12:38 pm)
Re: [lm-sensors] [PATCH] hwmon: Add power meters to Docume ...
, Henrique de Moraes H ...
, (Sun Sep 2, 7:02 pm)
Re: [lm-sensors] [PATCH] hwmon: Add power meters to Docume ...
, Jean Delvare
, (Mon Sep 3, 9:06 am)
Re: [lm-sensors] [PATCH] hwmon: Add power meters to Docume ...
, Henrique de Moraes H ...
, (Mon Sep 3, 4:22 pm)
Re: [lm-sensors] [PATCH] hwmon: Add power meters to Docume ...
, Jean Delvare
, (Thu Sep 6, 2:34 am)
Re: [lm-sensors] [PATCH] hwmon: Add power meters to Docume ...
, Henrique de Moraes H ...
, (Thu Sep 6, 9:29 am)
Re: [PATCH] v3 of IBM power meter driver
, Mark M. Hoffman
, (Tue Sep 11, 6:23 am)
Re: [PATCH] v3 of IBM power meter driver
, Jean Delvare
, (Tue Sep 11, 6:59 am)
Re: [PATCH] hwmon: Add power meters to Documentation/hwmon ...
, Darrick J. Wong
, (Tue Sep 11, 9:43 am)
Re: [PATCH] v3 of IBM power meter driver
, Darrick J. Wong
, (Tue Sep 11, 6:11 pm)
[PATCH v2] hwmon: Update Documentation/hwmon/sysfs-interface
, Darrick J. Wong
, (Fri Sep 14, 12:29 pm)
[PATCH v4] IBM power meter driver
, Darrick J. Wong
, (Fri Sep 14, 12:33 pm)
Re: [PATCH v2] hwmon: Update Documentation/hwmon/sysfs-int ...
, Jean Delvare
, (Mon Sep 17, 10:28 am)
Re: [PATCH v2] hwmon: Update Documentation/hwmon/sysfs-int ...
, Darrick J. Wong
, (Mon Sep 17, 11:43 am)
Re: [PATCH v2] hwmon: Update Documentation/hwmon/sysfs-int ...
, Jean Delvare
, (Fri Sep 21, 1:43 am)
Re: [PATCH v4] IBM power meter driver
, Mark M. Hoffman
, (Tue Oct 9, 5:00 am)
Re: [PATCH v4] IBM power meter driver
, Roel Kluin
, (Tue Oct 9, 9:44 am)
Re: [PATCH v4] IBM power meter driver
, Darrick J. Wong
, (Tue Oct 9, 1:40 pm)
[PATCH] ibmpex: Release IPMI user if hwmon registration fails
, Darrick J. Wong
, (Tue Oct 9, 3:08 pm)
Re: [PATCH] ibmpex: Release IPMI user if hwmon registratio ...
, Mark M. Hoffman
, (Thu Oct 11, 4:45 am)
Re: [PATCH v4] IBM power meter driver
, Darrick J. Wong
, (Fri Oct 12, 5:29 pm)
Navigation
Mailing list archives
Recent posts
Popular discussions
linux-kernel
:
Greg KH
Og dreams of kernels
Jens Axboe
[PATCH 31/33] Fusion: sg chaining support
Arnd Bergmann
Re: finding your own dead "CONFIG_" variables
Mark Brown
[PATCH 2/2] Subject: natsemi: Allow users to disable workaround for DspCfg reset
Tony Breeds
[LGUEST] Look in object dir for .config
git
:
Brian Downing
Re: Git in a Nutshell guide
John Benes
Re: master has some toys
Matthias Lederhofer
[PATCH 4/7] introduce GIT_WORK_TREE to specify the work tree
Alexander Sulfrian
[RFC/PATCH] RE: git calls SSH_ASKPASS even if DISPLAY is not set
Junio C Hamano
Re: Rss produced by git is not valid xml?
git-commits-head
:
Linux Kernel Mailing List
iSeries: fix section mismatch in iseries_veth
Linux Kernel Mailing List
ixbge: remove TX lock and redo TX accounting.
Linux Kernel Mailing List
ixgbe: fix several counter register errata
Linux Kernel Mailing List
b43: fix build with CONFIG_SSB_PCIHOST=n
Linux Kernel Mailing List
9p: block-based virtio client
linux-netdev
:
Michael Breuer
Re: [PATCH] af_packet: Don't use skb after dev_queue_xmit()
Michael Breuer
Re: [PATCH] af_packet: Don't use skb after dev_queue_xmit()
David Daney
[PATCH 5/7] Staging: Octeon Ethernet: Convert to NAPI.
Wolfgang Grandegger
[PATCH net-next v4 1/3] can: mscan: fix improper return if dlc < 8 in start_xmi...
Amit Kumar Salecha
[PATCHv3 NEXT 2/2] NET: Add Qlogic ethernet driver for CNA devices
openbsd-misc
:
Theo de Raadt
Re: Old IPSEC bug
Tomáš Bodžár
Problem with vpnc connection - check group password !
Insan Praja SW
Mandoc Compiling Error
Carl Roberso
Re: Cannot change MTU of carp interface?
Richard Daemon
Re: booting openbsd on eee without cd-rom
Colocation donated by:
Syndicate