diff options
Diffstat (limited to 'drivers/iio/light/hid-sensor-als.c')
-rw-r--r-- | drivers/iio/light/hid-sensor-als.c | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/drivers/iio/light/hid-sensor-als.c b/drivers/iio/light/hid-sensor-als.c index 8e1f69844eea..23eeeef64e84 100644 --- a/drivers/iio/light/hid-sensor-als.c +++ b/drivers/iio/light/hid-sensor-als.c | |||
@@ -272,10 +272,9 @@ static int __devinit hid_als_probe(struct platform_device *pdev) | |||
272 | goto error_free_dev; | 272 | goto error_free_dev; |
273 | } | 273 | } |
274 | 274 | ||
275 | channels = kmemdup(als_channels, | 275 | channels = kmemdup(als_channels, sizeof(als_channels), GFP_KERNEL); |
276 | sizeof(als_channels), | ||
277 | GFP_KERNEL); | ||
278 | if (!channels) { | 276 | if (!channels) { |
277 | ret = -ENOMEM; | ||
279 | dev_err(&pdev->dev, "failed to duplicate channels\n"); | 278 | dev_err(&pdev->dev, "failed to duplicate channels\n"); |
280 | goto error_free_dev; | 279 | goto error_free_dev; |
281 | } | 280 | } |