This is required so that we give up the last reference to the device. Signed-off-by: Levente Kurusa <le...@linux.com> --- drivers/sh/intc/core.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/drivers/sh/intc/core.c b/drivers/sh/intc/core.c index 8f32a13..c89768e 100644 --- a/drivers/sh/intc/core.c +++ b/drivers/sh/intc/core.c @@ -504,8 +504,10 @@ static int __init register_intc_devs(void) if (error == 0) error = device_create_file(&d->dev, &dev_attr_name); - if (error) + if (error) { + put_device(&d->dev); break; + } } } -- 1.8.3.1 -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/