diff options
author | Hans de Goede | 2012-05-23 00:09:34 +0200 |
---|---|---|
committer | Greg Kroah-Hartman | 2012-06-13 16:40:41 -0700 |
commit | 0998d0631001288a5974afc0b2a5f568bcdecb4d (patch) | |
tree | c9c6830877b9d39e0233cb29fcd577b947e22fb4 /Documentation/ABI | |
parent | b02f8bede217a4b145ecc16d3940c78d83941147 (diff) |
device-core: Ensure drvdata = NULL when no driver is bound
1) drvdata is for a driver to store a pointer to driver specific data
2) If no driver is bound, there is no driver specific data associated with
the device
3) Thus logically drvdata should be NULL if no driver is bound.
But many drivers don't clear drvdata on device_release, or set drvdata
early on in probe and leave it set on probe error. Both of which results
in a dangling pointer in drvdata.
This patch enforce for drvdata to be NULL after device_release or on probe
failure.
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'Documentation/ABI')
0 files changed, 0 insertions, 0 deletions