From: Benjamin Herrenschmidt Date: Wed, 10 Jun 2009 19:43:02 +0000 (-0700) Subject: devres: WARN() and return, don't crash on device_del() of uninitialized device X-Git-Tag: v2.6.31-rc3~3^2~8 X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=eb8d3c604fe7496323efb9a858bef84c489ca584;p=pandora-kernel.git devres: WARN() and return, don't crash on device_del() of uninitialized device I just debugged an obscure crash caused by a device_del() of a all NULL'd out struct device (in usb-serial) and found that a patch like this one would have saved me time (in addition to improved chances of a bug report from users hitting similar driver bugs). [akpm@linux-foundation.org: cleanup] Signed-off-by: Benjamin Herrenschmidt Cc: Kay Sievers Cc: Tejun Heo Signed-off-by: Andrew Morton Signed-off-by: Greg Kroah-Hartman --- Reading git-diff-tree failed