From: David Herrmann Date: Thu, 21 Nov 2013 19:15:48 +0000 (+0100) Subject: driver core: fix device_create() error path X-Git-Tag: v3.14-rc1~151^2~60 X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=bbc780f8bab52fef1784151d3c4982cb1143edd2;p=pandora-kernel.git driver core: fix device_create() error path We call put_device() in the error path, which is fine for dev==NULL. However, in case kobject_set_name_vargs() fails, we have dev!=NULL but device_initialized() wasn't called, yet. Fix this by splitting device_register() into explicit calls to device_add() and an early call to device_initialize(). Signed-off-by: David Herrmann Signed-off-by: Greg Kroah-Hartman --- Reading git-diff-tree failed