diff options
author | Ingo Molnar <mingo@elte.hu> | 2008-07-08 01:47:47 -0400 |
---|---|---|
committer | Ingo Molnar <mingo@elte.hu> | 2008-07-08 01:47:47 -0400 |
commit | 93022136fff9e6130aa128a5ed8a599e93ac813c (patch) | |
tree | 185390fb75a3d7423cc508610b76637c957205b9 /drivers/isdn | |
parent | c49c412a47b5102516d3313d4eba38cb1e968721 (diff) | |
parent | b7279469d66b55119784b8b9529c99c1955fe747 (diff) |
Merge commit 'v2.6.26-rc9' into x86/cpu
Diffstat (limited to 'drivers/isdn')
-rw-r--r-- | drivers/isdn/hardware/eicon/divasmain.c | 1 | ||||
-rw-r--r-- | drivers/isdn/hardware/eicon/divasproc.c | 4 | ||||
-rw-r--r-- | drivers/isdn/hysdn/hysdn_procconf.c | 29 | ||||
-rw-r--r-- | drivers/isdn/sc/ioctl.c | 1 |
4 files changed, 11 insertions, 24 deletions
diff --git a/drivers/isdn/hardware/eicon/divasmain.c b/drivers/isdn/hardware/eicon/divasmain.c index 5fcbdccd7a53..16a874bb1561 100644 --- a/drivers/isdn/hardware/eicon/divasmain.c +++ b/drivers/isdn/hardware/eicon/divasmain.c | |||
@@ -806,7 +806,6 @@ static int DIVA_INIT_FUNCTION divas_init(void) | |||
806 | 806 | ||
807 | if (!create_divas_proc()) { | 807 | if (!create_divas_proc()) { |
808 | #ifdef MODULE | 808 | #ifdef MODULE |
809 | remove_divas_proc(); | ||
810 | divas_unregister_chrdev(); | 809 | divas_unregister_chrdev(); |
811 | divasfunc_exit(); | 810 | divasfunc_exit(); |
812 | #endif | 811 | #endif |
diff --git a/drivers/isdn/hardware/eicon/divasproc.c b/drivers/isdn/hardware/eicon/divasproc.c index fae895828a17..040827288ec9 100644 --- a/drivers/isdn/hardware/eicon/divasproc.c +++ b/drivers/isdn/hardware/eicon/divasproc.c | |||
@@ -125,8 +125,8 @@ static const struct file_operations divas_fops = { | |||
125 | 125 | ||
126 | int create_divas_proc(void) | 126 | int create_divas_proc(void) |
127 | { | 127 | { |
128 | proc_create(divas_proc_name, S_IFREG | S_IRUGO, proc_net_eicon, | 128 | divas_proc_entry = proc_create(divas_proc_name, S_IFREG | S_IRUGO, |
129 | &divas_fops); | 129 | proc_net_eicon, &divas_fops); |
130 | if (!divas_proc_entry) | 130 | if (!divas_proc_entry) |
131 | return (0); | 131 | return (0); |
132 | 132 | ||
diff --git a/drivers/isdn/hysdn/hysdn_procconf.c b/drivers/isdn/hysdn/hysdn_procconf.c index 15906d005b05..484299b031f8 100644 --- a/drivers/isdn/hysdn/hysdn_procconf.c +++ b/drivers/isdn/hysdn/hysdn_procconf.c | |||
@@ -207,30 +207,17 @@ hysdn_conf_write(struct file *file, const char __user *buf, size_t count, loff_t | |||
207 | /* read conf file -> output card info data */ | 207 | /* read conf file -> output card info data */ |
208 | /*******************************************/ | 208 | /*******************************************/ |
209 | static ssize_t | 209 | static ssize_t |
210 | hysdn_conf_read(struct file *file, char __user *buf, size_t count, loff_t * off) | 210 | hysdn_conf_read(struct file *file, char __user *buf, size_t count, loff_t *off) |
211 | { | 211 | { |
212 | char *cp; | 212 | char *cp; |
213 | int i; | ||
214 | 213 | ||
215 | if (file->f_mode & FMODE_READ) { | 214 | if (!(file->f_mode & FMODE_READ)) |
216 | if (!(cp = file->private_data)) | 215 | return -EPERM; /* no permission to read */ |
217 | return (-EFAULT); /* should never happen */ | 216 | |
218 | i = strlen(cp); /* get total string length */ | 217 | if (!(cp = file->private_data)) |
219 | if (*off < i) { | 218 | return -EFAULT; /* should never happen */ |
220 | /* still bytes to transfer */ | 219 | |
221 | cp += *off; /* point to desired data offset */ | 220 | return simple_read_from_buffer(buf, count, off, cp, strlen(cp)); |
222 | i -= *off; /* remaining length */ | ||
223 | if (i > count) | ||
224 | i = count; /* limit length to transfer */ | ||
225 | if (copy_to_user(buf, cp, i)) | ||
226 | return (-EFAULT); /* copy error */ | ||
227 | *off += i; /* adjust offset */ | ||
228 | } else | ||
229 | return (0); | ||
230 | } else | ||
231 | return (-EPERM); /* no permission to read */ | ||
232 | |||
233 | return (i); | ||
234 | } /* hysdn_conf_read */ | 221 | } /* hysdn_conf_read */ |
235 | 222 | ||
236 | /******************/ | 223 | /******************/ |
diff --git a/drivers/isdn/sc/ioctl.c b/drivers/isdn/sc/ioctl.c index 7817d2244921..1081091bbfaf 100644 --- a/drivers/isdn/sc/ioctl.c +++ b/drivers/isdn/sc/ioctl.c | |||
@@ -226,6 +226,7 @@ int sc_ioctl(int card, scs_ioctl *data) | |||
226 | */ | 226 | */ |
227 | if (copy_from_user(spid, data->dataptr, SCIOC_SPIDSIZE)) { | 227 | if (copy_from_user(spid, data->dataptr, SCIOC_SPIDSIZE)) { |
228 | kfree(rcvmsg); | 228 | kfree(rcvmsg); |
229 | kfree(spid); | ||
229 | return -EFAULT; | 230 | return -EFAULT; |
230 | } | 231 | } |
231 | 232 | ||