Messages in this thread Patch in this message | | | From | Thadeu Lima de Souza Cascardo <> | Subject | [PATCH 4/4] ARM: use put_device instead of kfree | Date | Mon, 20 Apr 2009 21:17:16 -0300 |
| |
If it's not possible to allocate resources for the device, it's better to call put_device, which will release the device name, instead of oops'ing with a dev_set_name(&dev, NULL).
Signed-off-by: Thadeu Lima de Souza Cascardo <cascardo@holoscopio.com> --- arch/arm/common/sa1111.c | 3 +-- 1 files changed, 1 insertions(+), 2 deletions(-)
diff --git a/arch/arm/common/sa1111.c b/arch/arm/common/sa1111.c index ef12794..8e17608 100644 --- a/arch/arm/common/sa1111.c +++ b/arch/arm/common/sa1111.c @@ -568,8 +568,7 @@ sa1111_init_one_child(struct sa1111 *sachip, struct resource *parent, if (ret) { printk("SA1111: failed to allocate resource for %s\n", dev->res.name); - dev_set_name(&dev->dev, NULL); - kfree(dev); + put_device(&dev->dev); goto out; } -- 1.6.2.3
| |