aboutsummaryrefslogtreecommitdiff
path: root/drivers/staging/crystalhd
diff options
context:
space:
mode:
authorJani Nikula <ext-jani.1.nikula@nokia.com>2010-03-11 18:22:51 +0200
committerGreg Kroah-Hartman <gregkh@suse.de>2010-05-11 11:35:36 -0700
commit15df6385d940ad5486b4c2de8ab45979b13349fe (patch)
treed08e498e4e4d51e272af01b4ce7016cb74e747e3 /drivers/staging/crystalhd
parentb1facee664ab3b6b27715aec60653659f12182bd (diff)
downloadlinaro-lsk-15df6385d940ad5486b4c2de8ab45979b13349fe.tar.gz
Staging: crystalhd: fix device_create() return value check
Use IS_ERR() instead of comparing to NULL. Signed-off-by: Jani Nikula <ext-jani.1.nikula@nokia.com> Cc: Jarod Wilson <jarod@redhat.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Diffstat (limited to 'drivers/staging/crystalhd')
-rw-r--r--drivers/staging/crystalhd/crystalhd_lnx.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/staging/crystalhd/crystalhd_lnx.c b/drivers/staging/crystalhd/crystalhd_lnx.c
index 54bad652c0c..3c562f0f86b 100644
--- a/drivers/staging/crystalhd/crystalhd_lnx.c
+++ b/drivers/staging/crystalhd/crystalhd_lnx.c
@@ -376,7 +376,7 @@ static int __devinit chd_dec_init_chdev(struct crystalhd_adp *adp)
dev = device_create(crystalhd_class, NULL, MKDEV(adp->chd_dec_major, 0),
NULL, "crystalhd");
- if (!dev) {
+ if (IS_ERR(dev)) {
BCMLOG_ERR("failed to create device\n");
goto device_create_fail;
}