diff options
author | Hartmut Knaack <knaack.h@gmx.de> | 2014-02-16 11:53:00 +0000 |
---|---|---|
committer | Jonathan Cameron <jic23@kernel.org> | 2014-02-18 08:46:36 +0000 |
commit | 92825ff97411f0121166485798cdaf2deb6b5952 (patch) | |
tree | d410f5fb861d7d128e7fa1287f082f3cb7ac7251 /drivers/iio/buffer_cb.c | |
parent | b8a70aef04bf93ba0141008d284ffcdda5883093 (diff) |
iio get rid of unneccessary error_ret
Get rid of obsolete uses of goto error_ret and some empty lines.
Signed-off-by: Hartmut Knaack <knaack.h@gmx.de>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
Diffstat (limited to 'drivers/iio/buffer_cb.c')
-rw-r--r-- | drivers/iio/buffer_cb.c | 7 |
1 files changed, 2 insertions, 5 deletions
diff --git a/drivers/iio/buffer_cb.c b/drivers/iio/buffer_cb.c index 2d9c6f8c06db..eb46e728aa2e 100644 --- a/drivers/iio/buffer_cb.c +++ b/drivers/iio/buffer_cb.c @@ -46,10 +46,8 @@ struct iio_cb_buffer *iio_channel_get_all_cb(struct device *dev, struct iio_channel *chan; cb_buff = kzalloc(sizeof(*cb_buff), GFP_KERNEL); - if (cb_buff == NULL) { - ret = -ENOMEM; - goto error_ret; - } + if (cb_buff == NULL) + return ERR_PTR(-ENOMEM); iio_buffer_init(&cb_buff->buffer); @@ -91,7 +89,6 @@ error_release_channels: iio_channel_release_all(cb_buff->channels); error_free_cb_buff: kfree(cb_buff); -error_ret: return ERR_PTR(ret); } EXPORT_SYMBOL_GPL(iio_channel_get_all_cb); |