History

Merge tag 'staging-3.10-rc4' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/staging

Pull staging driver fixes from Greg Kroah-Hartman: "Here are some staging and IIO driver fixes for the 3.10-rc5 release. All of them are tiny, and fix a number of reported issues (build and runtime)" Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org> * tag 'staging-3.10-rc4' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/staging: iio:inkern: Fix typo/bug in convert raw to processed. iio: frequency: ad4350: Fix bug / typo in mask inkern: iio_device_put after incorrect return/goto staging: alarm-dev: information leak in alarm_compat_ioctl() iio:callback buffer: free the scan_mask staging: alarm-dev: information leak in alarm_ioctl() drivers: staging: zcache: fix compile error staging: dwc2: fix value of dma_mask

Linus Torvalds committed 13 years ago

Commit e2b02e22 parents 3b285cb 1f89b8f8 files · +21 −15Browse files

Unified · Split

8 files
  1. drivers/iio/buffer_cb.c +4 −1
  2. drivers/iio/frequency/adf4350.c +1 −1
  3. drivers/iio/inkern.c +2 −2
  4. drivers/staging/android/alarm-dev.c +6 −2
  5. drivers/staging/dwc2/hcd.c +2 −3
  6. drivers/staging/zcache/ramster.h +0 −4
  7. drivers/staging/zcache/ramster/debug.c +2 −0
  8. drivers/staging/zcache/ramster/ramster.c +4 −2
drivers/iio/buffer_cb.c+4−1
@@ -64,7 +64,7 @@ struct iio_cb_buffer *iio_channel_get_all_cb(struct device *dev, · 63 unmodified lines
6464 while (chan->indio_dev) {
6565 if (chan->indio_dev != indio_dev) {
6666 ret = -EINVAL;
67− goto error_release_channels;
67+ goto error_free_scan_mask;
6868 }
6969 set_bit(chan->channel->scan_index,
7070 cb_buff->buffer.scan_mask);
@@ -73,6 +73,8 @@ struct iio_cb_buffer *iio_channel_get_all_cb(struct device *dev, · 2 unmodified lines
7373
7474 return cb_buff;
7575
76+error_free_scan_mask:
77+ kfree(cb_buff->buffer.scan_mask);
7678 error_release_channels:
7779 iio_channel_release_all(cb_buff->channels);
7880 error_free_cb_buff:
@@ -100,6 +102,7 @@ EXPORT_SYMBOL_GPL(iio_channel_stop_all_cb); · 21 unmodified lines
100102
101103 void iio_channel_release_all_cb(struct iio_cb_buffer *cb_buff)
102104 {
105+ kfree(cb_buff->buffer.scan_mask);
103106 iio_channel_release_all(cb_buff->channels);
104107 kfree(cb_buff);
105108 }
drivers/iio/frequency/adf4350.c+1−1
@@ -212,7 +212,7 @@ static int adf4350_set_freq(struct adf4350_state *st, unsigned long long freq) · 211 unmodified lines
212212 (pdata->r2_user_settings & (ADF4350_REG2_PD_POLARITY_POS |
213213 ADF4350_REG2_LDP_6ns | ADF4350_REG2_LDF_INT_N |
214214 ADF4350_REG2_CHARGE_PUMP_CURR_uA(5000) |
215− ADF4350_REG2_MUXOUT(0x7) | ADF4350_REG2_NOISE_MODE(0x9)));
215+ ADF4350_REG2_MUXOUT(0x7) | ADF4350_REG2_NOISE_MODE(0x3)));
216216
217217 st->regs[ADF4350_REG3] = pdata->r3_user_settings &
218218 (ADF4350_REG3_12BIT_CLKDIV(0xFFF) |
drivers/iio/inkern.c+2−2
@@ -124,7 +124,7 @@ static int __of_iio_channel_get(struct iio_channel *channel, · 123 unmodified lines
124124 channel->indio_dev = indio_dev;
125125 index = iiospec.args_count ? iiospec.args[0] : 0;
126126 if (index >= indio_dev->num_channels) {
127− return -EINVAL;
127+ err = -EINVAL;
128128 goto err_put;
129129 }
130130 channel->channel = &indio_dev->channels[index];
@@ -450,7 +450,7 @@ static int iio_convert_raw_to_processed_unlocked(struct iio_channel *chan, · 319 unmodified lines
450450 s64 raw64 = raw;
451451 int ret;
452452
453− ret = iio_channel_read(chan, &offset, NULL, IIO_CHAN_INFO_SCALE);
453+ ret = iio_channel_read(chan, &offset, NULL, IIO_CHAN_INFO_OFFSET);
454454 if (ret == 0)
455455 raw64 += offset;
456456
drivers/staging/android/alarm-dev.c+6−2
@@ -264,6 +264,8 @@ static long alarm_ioctl(struct file *file, unsigned int cmd, unsigned long arg) · 263 unmodified lines
264264 }
265265
266266 rv = alarm_do_ioctl(file, cmd, &ts);
267+ if (rv)
268+ return rv;
267269
268270 switch (ANDROID_ALARM_BASE_CMD(cmd)) {
269271 case ANDROID_ALARM_GET_TIME(0):
@@ -272,7 +274,7 @@ static long alarm_ioctl(struct file *file, unsigned int cmd, unsigned long arg) · 2 unmodified lines
272274 break;
273275 }
274276
275− return rv;
277+ return 0;
276278 }
277279 #ifdef CONFIG_COMPAT
278280 static long alarm_compat_ioctl(struct file *file, unsigned int cmd,
@@ -295,6 +297,8 @@ static long alarm_compat_ioctl(struct file *file, unsigned int cmd, · 16 unmodified lines
295297 }
296298
297299 rv = alarm_do_ioctl(file, cmd, &ts);
300+ if (rv)
301+ return rv;
298302
299303 switch (ANDROID_ALARM_BASE_CMD(cmd)) {
300304 case ANDROID_ALARM_GET_TIME(0): /* NOTE: we modified cmd above */
@@ -303,7 +307,7 @@ static long alarm_compat_ioctl(struct file *file, unsigned int cmd, · 2 unmodified lines
303307 break;
304308 }
305309
306− return rv;
310+ return 0;
307311 }
308312 #endif
309313
drivers/staging/dwc2/hcd.c+2−3
@@ -2804,9 +2804,8 @@ int dwc2_hcd_init(struct dwc2_hsotg *hsotg, int irq, · 2803 unmodified lines
28042804
28052805 /* Set device flags indicating whether the HCD supports DMA */
28062806 if (hsotg->core_params->dma_enable > 0) {
2807− if (dma_set_mask(hsotg->dev, DMA_BIT_MASK(31)) < 0)
2808− dev_warn(hsotg->dev,
2809− "can't enable workaround for >2GB RAM\n");
2807+ if (dma_set_mask(hsotg->dev, DMA_BIT_MASK(32)) < 0)
2808+ dev_warn(hsotg->dev, "can't set DMA mask\n");
28102809 if (dma_set_coherent_mask(hsotg->dev, DMA_BIT_MASK(31)) < 0)
28112810 dev_warn(hsotg->dev,
28122811 "can't enable workaround for >2GB RAM\n");
drivers/staging/zcache/ramster.h+0−4
@@ -11,10 +11,6 @@ · 10 unmodified lines
1111 #ifndef _ZCACHE_RAMSTER_H_
1212 #define _ZCACHE_RAMSTER_H_
1313
14−#ifdef CONFIG_RAMSTER_MODULE
15−#define CONFIG_RAMSTER
16−#endif
17−
1814 #ifdef CONFIG_RAMSTER
1915 #include "ramster/ramster.h"
2016 #else
drivers/staging/zcache/ramster/debug.c+2−0
@@ -1,6 +1,8 @@
11 #include <linux/atomic.h>
22 #include "debug.h"
33
4+ssize_t ramster_foreign_eph_pages;
5+ssize_t ramster_foreign_pers_pages;
46 #ifdef CONFIG_DEBUG_FS
57 #include <linux/debugfs.h>
68
drivers/staging/zcache/ramster/ramster.c+4−2
@@ -66,8 +66,6 @@ static int ramster_remote_target_nodenum __read_mostly = -1; · 65 unmodified lines
6666
6767 /* Used by this code. */
6868 long ramster_flnodes;
69−ssize_t ramster_foreign_eph_pages;
70−ssize_t ramster_foreign_pers_pages;
7169 /* FIXME frontswap selfshrinking knobs in debugfs? */
7270
7371 static LIST_HEAD(ramster_rem_op_list);
@@ -399,14 +397,18 @@ void ramster_count_foreign_pages(bool eph, int count) · 325 unmodified lines
399397 inc_ramster_foreign_eph_pages();
400398 } else {
401399 dec_ramster_foreign_eph_pages();
400+#ifdef CONFIG_RAMSTER_DEBUG
402401 WARN_ON_ONCE(ramster_foreign_eph_pages < 0);
402+#endif
403403 }
404404 } else {
405405 if (count > 0) {
406406 inc_ramster_foreign_pers_pages();
407407 } else {
408408 dec_ramster_foreign_pers_pages();
409+#ifdef CONFIG_RAMSTER_DEBUG
409410 WARN_ON_ONCE(ramster_foreign_pers_pages < 0);
411+#endif
410412 }
411413 }
412414 }

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t