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@xxxxxxxxxxxxxx> --- 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-input" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html