[<prev] [next>] [day] [month] [year] [list]
Message-Id: <7fac8c08bd1ae80bd013ea0fbf74142e78b51191.1240272929.git.cascardo@holoscopio.com>
Date: Mon, 20 Apr 2009 21:17:16 -0300
From: Thadeu Lima de Souza Cascardo <cascardo@...oscopio.com>
To: linux-kernel@...r.kernel.org
Cc: linux-input@...r.kernel.org, gregkh@...e.de, kay.sievers@...y.org,
Thadeu Lima de Souza Cascardo <cascardo@...oscopio.com>
Subject: [PATCH 4/4] ARM: use put_device instead of kfree
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@...oscopio.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
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists