Commit 15df6385 authored by Jani Nikula's avatar Jani Nikula Committed by Greg Kroah-Hartman

Staging: crystalhd: fix device_create() return value check

Use IS_ERR() instead of comparing to NULL.
Signed-off-by: default avatarJani Nikula <ext-jani.1.nikula@nokia.com>
Cc: Jarod Wilson <jarod@redhat.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@suse.de>
parent b1facee6
......@@ -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;
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment