Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 321752
b: refs/heads/master
c: 1c795eb
h: refs/heads/master
v: v3
  • Loading branch information
Alexey Khoroshilov authored and Jonathan Cameron committed Aug 16, 2012
1 parent 76e69f1 commit f5242c3
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 4 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 8857df3aceb7a8eb7558059b7da109e41dd1fb95
refs/heads/master: 1c795ebd00042b3a5c97e049fd1c08763714a7a8
7 changes: 4 additions & 3 deletions trunk/drivers/iio/light/adjd_s311.c
Original file line number Diff line number Diff line change
Expand Up @@ -271,9 +271,10 @@ static int adjd_s311_update_scan_mode(struct iio_dev *indio_dev,
const unsigned long *scan_mask)
{
struct adjd_s311_data *data = iio_priv(indio_dev);
data->buffer = krealloc(data->buffer, indio_dev->scan_bytes,
GFP_KERNEL);
if (!data->buffer)

kfree(data->buffer);
data->buffer = kmalloc(indio_dev->scan_bytes, GFP_KERNEL);
if (data->buffer == NULL)
return -ENOMEM;

return 0;
Expand Down

0 comments on commit f5242c3

Please sign in to comment.