summaryrefslogtreecommitdiffstats
path: root/drivers/gpu/drm/drm_sysfs.c
diff options
context:
space:
mode:
authorDavid Herrmann <dh.herrmann@gmail.com>2015-09-09 14:21:29 +0200
committerDaniel Vetter <daniel.vetter@ffwll.ch>2015-09-09 15:03:38 +0200
commit26b91ae4732be89228d207c76827071c6aecc4d8 (patch)
treeb951f5a79313581c1ef383159947cd629b11f335 /drivers/gpu/drm/drm_sysfs.c
parent3a818d350f6b5ad542175ab1f71c027787ce952e (diff)
downloadop-kernel-dev-26b91ae4732be89228d207c76827071c6aecc4d8.zip
op-kernel-dev-26b91ae4732be89228d207c76827071c6aecc4d8.tar.gz
drm: simplify drm_sysfs_destroy() via IS_ERR_OR_NULL()
Simplify `foo == NULL || IS_ERR(foo)` via IS_ERR_OR_NULL(). This is pretty commonly used all over the kernel, especially for debugfs/sysfs cleanup paths. Signed-off-by: David Herrmann <dh.herrmann@gmail.com> Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Diffstat (limited to 'drivers/gpu/drm/drm_sysfs.c')
-rw-r--r--drivers/gpu/drm/drm_sysfs.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/gpu/drm/drm_sysfs.c b/drivers/gpu/drm/drm_sysfs.c
index 0f6cd33..3f66cb0 100644
--- a/drivers/gpu/drm/drm_sysfs.c
+++ b/drivers/gpu/drm/drm_sysfs.c
@@ -156,7 +156,7 @@ err_out:
*/
void drm_sysfs_destroy(void)
{
- if ((drm_class == NULL) || (IS_ERR(drm_class)))
+ if (IS_ERR_OR_NULL(drm_class))
return;
class_remove_file(drm_class, &class_attr_version.attr);
class_destroy(drm_class);
OpenPOWER on IntegriCloud