mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-29 19:21:31 -04:00
HSI: hsi-char: fix driver for multiport scenarios
Fix return code check of alloc_chrdev_region, which returns 0 on success. Signed-off-by: Sebastian Reichel <[email protected]> Reviewed-by: Pavel Machek <[email protected]>
This commit is contained in:
parent
56459ea9aa
commit
84d93b5e60
1 changed files with 1 additions and 1 deletions
|
|
@ -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);
|
||||
|
|
|
|||
Loading…
Reference in a new issue