summaryrefslogtreecommitdiffstats
path: root/drivers/hsi/clients
diff options
context:
space:
mode:
authorSebastian Reichel <sre@kernel.org>2013-09-20 22:42:22 +0200
committerSebastian Reichel <sre@kernel.org>2014-05-04 09:49:58 +0200
commit84d93b5e605324679cffb6d28c7339dd18165fd4 (patch)
treef40c97ed5066f9ce4d8cee1c87f44e10e0d8effe /drivers/hsi/clients
parent56459ea9aada1ba228cd0dd75accb56b95e07d73 (diff)
downloadop-kernel-dev-84d93b5e605324679cffb6d28c7339dd18165fd4.zip
op-kernel-dev-84d93b5e605324679cffb6d28c7339dd18165fd4.tar.gz
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 <sre@kernel.org> Reviewed-by: Pavel Machek <pavel@ucw.cz>
Diffstat (limited to 'drivers/hsi/clients')
-rw-r--r--drivers/hsi/clients/hsi_char.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/hsi/clients/hsi_char.c b/drivers/hsi/clients/hsi_char.c
index e61e5f9..3073320 100644
--- a/drivers/hsi/clients/hsi_char.c
+++ b/drivers/hsi/clients/hsi_char.c
@@ -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);
OpenPOWER on IntegriCloud