Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 325364
b: refs/heads/master
c: b2b79ff
h: refs/heads/master
v: v3
  • Loading branch information
Kim, Milo authored and Jonathan Cameron committed Sep 17, 2012
1 parent 7845407 commit a88f681
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 2 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: 2cc412b513f70ce914a3554a34917f7585a16f04
refs/heads/master: b2b79ffa40d7ae40115631660ff8b6da3cf989b6
11 changes: 10 additions & 1 deletion trunk/drivers/iio/inkern.c
Original file line number Diff line number Diff line change
Expand Up @@ -136,12 +136,21 @@ struct iio_channel *iio_channel_get(const char *name, const char *channel_name)

channel->indio_dev = c->indio_dev;

if (c->map->adc_channel_label)
if (c->map->adc_channel_label) {
channel->channel =
iio_chan_spec_from_name(channel->indio_dev,
c->map->adc_channel_label);

if (channel->channel == NULL)
goto error_no_chan;
}

return channel;

error_no_chan:
iio_device_put(c->indio_dev);
kfree(channel);
return ERR_PTR(-EINVAL);
}
EXPORT_SYMBOL_GPL(iio_channel_get);

Expand Down

0 comments on commit a88f681

Please sign in to comment.