summaryrefslogtreecommitdiffstats
path: root/Documentation/ia64/mca.txt
diff options
context:
space:
mode:
authorAxel Lin <axel.lin@gmail.com>2011-08-08 17:17:18 +0800
committerMatthew Garrett <mjg@redhat.com>2011-10-24 16:52:38 +0200
commit8fcf71aa0032acbd30b3222f9cb238919ab3b984 (patch)
tree04f2299615adfef58c098960fbc3524da5981498 /Documentation/ia64/mca.txt
parente9298028ee69bda44607156e7348cd32f7ab9360 (diff)
platform-drivers-x86: asus-laptop: fix wrong test for successful registered led_classdev
device_create returns &struct device pointer on success, or ERR_PTR() on error. Thus if led_classdev_register fails, led_cdev->dev is always not NULL. Thus to unregister a successful registered led_classdev, we should check IS_ERR_OR_NULL macro for led_cdev->dev instead of checking if led_cdev->dev is NULL or not. we use IS_ERR_OR_NULL instead of IS_ERR because if we havn't call led_classdev_register, the led_cdev->dev is NULL. Signed-off-by: Axel Lin <axel.lin@gmail.com> Acked-by: Corentin Chary <corentin.chary@gmail.com> Signed-off-by: Matthew Garrett <mjg@redhat.com>
Diffstat (limited to 'Documentation/ia64/mca.txt')
0 files changed, 0 insertions, 0 deletions