diff options
author | Levente Kurusa <levex@linux.com> | 2015-05-06 10:19:52 +1000 |
---|---|---|
committer | Stephen Rothwell <sfr@canb.auug.org.au> | 2015-05-12 15:49:59 +1000 |
commit | 07f0773a34229d2cedf446d69ea12e23de9bef8f (patch) | |
tree | 1daad7d86b5472c4b122fc73ec511f9ff9f0ec11 /drivers/parport | |
parent | a7772415d56001b0ff7ff129b42f980d46019111 (diff) |
drivers/w1/w1_int.c: call put_device if device_register fails
Currently, memsetting and kfreeing the device is bad behaviour. The
device will have a reference count of 1 and hence can cause trouble
because it has kfree'd. Proper way to handle a failed device_register is
to call put_device right after it fails.
Signed-off-by: Levente Kurusa <levex@linux.com>
Acked-by: Evgeniy Polyakov <zbr@ioremap.net>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Diffstat (limited to 'drivers/parport')
0 files changed, 0 insertions, 0 deletions