Commit 84d93b5e authored by Sebastian Reichel's avatar Sebastian Reichel
Browse files

HSI: hsi-char: fix driver for multiport scenarios



Fix return code check of alloc_chrdev_region, which
returns 0 on success.
Signed-off-by: default avatarSebastian Reichel <sre@kernel.org>
Reviewed-by: Pavel Machek's avatarPavel Machek <pavel@ucw.cz>
parent 56459ea9
......@@ -705,7 +705,7 @@ static int hsc_probe(struct device *dev)
if (!hsc_major) {
ret = alloc_chrdev_region(&hsc_dev, hsc_baseminor,
HSC_DEVS, devname);
if (ret > 0)
if (ret == 0)
hsc_major = MAJOR(hsc_dev);
} else {
hsc_dev = MKDEV(hsc_major, hsc_baseminor);
......
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