diff options
author | Paul Mackerras <paulus@samba.org> | 2006-03-28 21:24:50 -0500 |
---|---|---|
committer | Paul Mackerras <paulus@samba.org> | 2006-03-28 21:24:50 -0500 |
commit | bac30d1a78d0f11c613968fc8b351a91ed465386 (patch) | |
tree | e52f3c876522a2f6047a6ec1c27df2e8a79486b8 /drivers/block/paride/pt.c | |
parent | e8222502ee6157e2713da9e0792c21f4ad458d50 (diff) | |
parent | ca9ba4471c1203bb6e759b76e83167fec54fe590 (diff) |
Merge ../linux-2.6
Diffstat (limited to 'drivers/block/paride/pt.c')
-rw-r--r-- | drivers/block/paride/pt.c | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/drivers/block/paride/pt.c b/drivers/block/paride/pt.c index 715ae5dc88fb..d2013d362403 100644 --- a/drivers/block/paride/pt.c +++ b/drivers/block/paride/pt.c | |||
@@ -943,7 +943,8 @@ static ssize_t pt_write(struct file *filp, const char __user *buf, size_t count, | |||
943 | 943 | ||
944 | static int __init pt_init(void) | 944 | static int __init pt_init(void) |
945 | { | 945 | { |
946 | int unit, err = 0; | 946 | int unit; |
947 | int err; | ||
947 | 948 | ||
948 | if (disable) { | 949 | if (disable) { |
949 | err = -1; | 950 | err = -1; |
@@ -955,14 +956,15 @@ static int __init pt_init(void) | |||
955 | goto out; | 956 | goto out; |
956 | } | 957 | } |
957 | 958 | ||
958 | if (register_chrdev(major, name, &pt_fops)) { | 959 | err = register_chrdev(major, name, &pt_fops); |
960 | if (err < 0) { | ||
959 | printk("pt_init: unable to get major number %d\n", major); | 961 | printk("pt_init: unable to get major number %d\n", major); |
960 | for (unit = 0; unit < PT_UNITS; unit++) | 962 | for (unit = 0; unit < PT_UNITS; unit++) |
961 | if (pt[unit].present) | 963 | if (pt[unit].present) |
962 | pi_release(pt[unit].pi); | 964 | pi_release(pt[unit].pi); |
963 | err = -1; | ||
964 | goto out; | 965 | goto out; |
965 | } | 966 | } |
967 | major = err; | ||
966 | pt_class = class_create(THIS_MODULE, "pt"); | 968 | pt_class = class_create(THIS_MODULE, "pt"); |
967 | if (IS_ERR(pt_class)) { | 969 | if (IS_ERR(pt_class)) { |
968 | err = PTR_ERR(pt_class); | 970 | err = PTR_ERR(pt_class); |