commit | 1eb6e0e0a7a53db8cd18ac49d4e3c820242d6bd7 | [log] [tgz] |
---|---|---|
author | Levente Kurusa <levex@linux.com> | Fri May 29 10:17:50 2015 +1000 |
committer | Stephen Rothwell <sfr@canb.auug.org.au> | Tue Jun 02 21:05:50 2015 +1000 |
tree | b420931c0b35f4be05959f942bbde45443164960 | |
parent | 69a72dc1edb971a79a4969de7a301922e1cb14d1 [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>