From: Jani Nikula Date: Thu, 11 Mar 2010 16:22:51 +0000 (+0200) Subject: Staging: crystalhd: fix device_create() return value check X-Git-Tag: MMI-PSA29.97-13-9~23841^2^2~518 X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=15df6385d940ad5486b4c2de8ab45979b13349fe;p=GitHub%2FMotorolaMobilityLLC%2Fkernel-slsi.git Staging: crystalhd: fix device_create() return value check Use IS_ERR() instead of comparing to NULL. Signed-off-by: Jani Nikula Cc: Jarod Wilson Signed-off-by: Greg Kroah-Hartman --- diff --git a/drivers/staging/crystalhd/crystalhd_lnx.c b/drivers/staging/crystalhd/crystalhd_lnx.c index 54bad652c0c5..3c562f0f86b3 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; }