diff options
Diffstat (limited to 'drivers/char')
-rw-r--r-- | drivers/char/bsr.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/drivers/char/bsr.c b/drivers/char/bsr.c index 0c688232aab3..97467053a01b 100644 --- a/drivers/char/bsr.c +++ b/drivers/char/bsr.c | |||
@@ -297,7 +297,6 @@ static int __init bsr_init(void) | |||
297 | struct device_node *np; | 297 | struct device_node *np; |
298 | dev_t bsr_dev; | 298 | dev_t bsr_dev; |
299 | int ret = -ENODEV; | 299 | int ret = -ENODEV; |
300 | int result; | ||
301 | 300 | ||
302 | np = of_find_compatible_node(NULL, NULL, "ibm,bsr"); | 301 | np = of_find_compatible_node(NULL, NULL, "ibm,bsr"); |
303 | if (!np) | 302 | if (!np) |
@@ -306,13 +305,14 @@ static int __init bsr_init(void) | |||
306 | bsr_class = class_create(THIS_MODULE, "bsr"); | 305 | bsr_class = class_create(THIS_MODULE, "bsr"); |
307 | if (IS_ERR(bsr_class)) { | 306 | if (IS_ERR(bsr_class)) { |
308 | printk(KERN_ERR "class_create() failed for bsr_class\n"); | 307 | printk(KERN_ERR "class_create() failed for bsr_class\n"); |
308 | ret = PTR_ERR(bsr_class); | ||
309 | goto out_err_1; | 309 | goto out_err_1; |
310 | } | 310 | } |
311 | bsr_class->dev_attrs = bsr_dev_attrs; | 311 | bsr_class->dev_attrs = bsr_dev_attrs; |
312 | 312 | ||
313 | result = alloc_chrdev_region(&bsr_dev, 0, BSR_MAX_DEVS, "bsr"); | 313 | ret = alloc_chrdev_region(&bsr_dev, 0, BSR_MAX_DEVS, "bsr"); |
314 | bsr_major = MAJOR(bsr_dev); | 314 | bsr_major = MAJOR(bsr_dev); |
315 | if (result < 0) { | 315 | if (ret < 0) { |
316 | printk(KERN_ERR "alloc_chrdev_region() failed for bsr\n"); | 316 | printk(KERN_ERR "alloc_chrdev_region() failed for bsr\n"); |
317 | goto out_err_2; | 317 | goto out_err_2; |
318 | } | 318 | } |