From: Jean Delvare Date: Mon, 14 Apr 2014 10:57:43 +0000 (+0200) Subject: driver core: dev_get_drvdata: Don't check for NULL dev X-Git-Tag: omap-for-v3.16/fixes-against-rc1~39^2~37^2~6 X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=d4332013919aa87dbdede67d677e4cf2cd32e898;p=pandora-kernel.git driver core: dev_get_drvdata: Don't check for NULL dev There is no point in calling dev_get_drvdata without a valid device. So checking for dev == NULL is pointless. If such a check is ever needed - which I doubt - the driver should do it before calling dev_get_drvdata. We were returning NULL if dev was NULL, which the caller certainly did not expect anyway, so that was only delaying the crash if the caller is not paying attention. Signed-off-by: Jean Delvare Cc: Greg Kroah-Hartman Signed-off-by: Greg Kroah-Hartman --- Reading git-diff-tree failed