Message ID | e3308896-dd91-1af0-912f-32cc0794361e@users.sourceforge.net (mailing list archive) |
---|---|
State | New, archived |
Headers | show |
diff --git a/drivers/iio/gyro/hid-sensor-gyro-3d.c b/drivers/iio/gyro/hid-sensor-gyro-3d.c index f59995a90387..93465816c5c7 100644 --- a/drivers/iio/gyro/hid-sensor-gyro-3d.c +++ b/drivers/iio/gyro/hid-sensor-gyro-3d.c @@ -317,10 +317,8 @@ static int hid_gyro_3d_probe(struct platform_device *pdev) indio_dev->channels = kmemdup(gyro_3d_channels, sizeof(gyro_3d_channels), GFP_KERNEL); - if (!indio_dev->channels) { - dev_err(&pdev->dev, "failed to duplicate channels\n"); + if (!indio_dev->channels) return -ENOMEM; - } ret = gyro_3d_parse_report(pdev, hsdev, (struct iio_chan_spec *)indio_dev->channels,