Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1503792

Re: [PATCH 2/7] iio: light: tsl2583: change functions to only have a single exit point

From Dan Carpenter <dan.carpenter@oracle.com>
Newsgroups linux.kernel
Subject Re: [PATCH 2/7] iio: light: tsl2583: change functions to only have a single exit point
Date 2016-10-19 17:00 +0200
Message-ID <su0cb-2v4-87@gated-at.bofh.it> (permalink)
References <stZSO-2nd-55@gated-at.bofh.it> <su0cb-2v4-85@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


On Wed, Oct 19, 2016 at 06:32:05AM -0400, Brian Masney wrote:
> Change the following functions to only have a single exit point:
> taos_i2c_read(), taos_als_calibrate(), taos_chip_on(),
> taos_gain_store(), taos_gain_available_show(), taos_luxtable_store()
> and taos_probe().
> 

What's the point of this?  This style of code just makes things more
complicated and leads to "forgot the error code" bugs.  People think
that it future proofs the code in case we add locking but I have looked
into this and it has minimal if any impact at preventing locking bugs.

regards,
dan carpenter

Back to linux.kernel | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


Thread

[PATCH 1/7] iio: light: tsl2583: return proper error code Brian Masney <masneyb@onstation.org> - 2016-10-19 16:50 +0200
  [PATCH 3/7] iio: light: tsl2583: use DEVICE_ATTR_{RO, RW, WO} macros Brian Masney <masneyb@onstation.org> - 2016-10-19 16:50 +0200
    Re: [PATCH 3/7] iio: light: tsl2583: use DEVICE_ATTR_{RO, RW, WO}  macros Peter Meerwald-Stadler <pmeerw@pmeerw.net> - 2016-10-19 18:00 +0200
    Re: [PATCH 3/7] iio: light: tsl2583: use DEVICE_ATTR_{RO, RW, WO} macros Jonathan Cameron <jic23@jic23.retrosnub.co.uk> - 2016-10-19 18:40 +0200
  [PATCH 2/7] iio: light: tsl2583: change functions to only have a single exit point Brian Masney <masneyb@onstation.org> - 2016-10-19 17:00 +0200
    Re: [PATCH 2/7] iio: light: tsl2583: change functions to only have a  single exit point Dan Carpenter <dan.carpenter@oracle.com> - 2016-10-19 17:00 +0200
  [PATCH 4/7] iio: light: tsl2583: return proper error code in sysfs store functions Brian Masney <masneyb@onstation.org> - 2016-10-19 17:00 +0200
  [PATCH 5/7] iio: light: tsl2583: check return values from taos_chip_{on,off} Brian Masney <masneyb@onstation.org> - 2016-10-19 17:00 +0200
  Re: [PATCH 1/7] iio: light: tsl2583: return proper error code Jonathan Cameron <jic23@kernel.org> - 2016-10-22 19:20 +0200

csiph-web