driver core: Prevent reference to freed memory on error path
authorPhil Carmody <ext-phil.2.carmody@nokia.com>
Mon, 14 Dec 2009 18:28:12 +0000 (20:28 +0200)
committerGreg Kroah-Hartman <gregkh@suse.de>
Wed, 23 Dec 2009 19:23:44 +0000 (11:23 -0800)
commit99b28f1b4126582f87ce454d4affb823bddf2cd8
treec36557d76b62d9b7b765627f569981ddb69dcfb3
parente6309e7568d4b9d62298a887b10de42df11cb8c1
driver core: Prevent reference to freed memory on error path

priv is drv->p. So only free drv->p after we've finished using priv.

Found using a static code analysis tool

Signed-off-by: Phil Carmody <ext-phil.2.carmody@nokia.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
drivers/base/bus.c