summaryrefslogtreecommitdiff
path: root/include/linux/device.h
diff options
context:
space:
mode:
authorJean Delvare <jdelvare@suse.de>2014-04-14 12:57:43 +0200
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2014-05-27 13:46:50 -0700
commitd4332013919aa87dbdede67d677e4cf2cd32e898 (patch)
tree084e6ab8139da902a32b7bedef9110351e527d4b /include/linux/device.h
parent2c1f1ff0f0d9e0df8c9b6d3697ac250900091541 (diff)
downloadlwn-d4332013919aa87dbdede67d677e4cf2cd32e898.tar.gz
lwn-d4332013919aa87dbdede67d677e4cf2cd32e898.zip
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 <jdelvare@suse.de> Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'include/linux/device.h')
0 files changed, 0 insertions, 0 deletions