Re: [PATCH 17/38] parisc: kernel: add missing put_device call
From: James Bottomley
Date: Thu Dec 19 2013 - 10:29:34 EST
On Thu, 2013-12-19 at 16:03 +0100, Levente Kurusa wrote:
> This is required so that we give up the last reference to the device.
No, it's not. And the subject is misleading at best, since this isn't
any form of problem in the code.
If the add fails, the device isn't visible in sysfs and no references
have been handed out. We're perfectly entitled to follow the common
pattern of simply destroying it at this point rather than going through
the nascent refcounting.
James
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/