From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mout.web.de ([217.72.192.78]:53633 "EHLO mout.web.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932127AbdJZQui (ORCPT ); Thu, 26 Oct 2017 12:50:38 -0400 Subject: Re: [PATCH] iio/light/max44000: Use common error handling code in max44000_probe() To: Jonathan Cameron , linux-iio@vger.kernel.org Cc: Akinobu Mita , Crestez Dan Leonard , Hartmut Knaack , Lars-Peter Clausen , Peter Meerwald-Stadler , LKML , kernel-janitors@vger.kernel.org References: <28854212-d360-8636-4de5-017fbee0db36@users.sourceforge.net> <20171026172926.62d5ff87@archlinux> From: SF Markus Elfring Message-ID: Date: Thu, 26 Oct 2017 18:50:14 +0200 MIME-Version: 1.0 In-Reply-To: <20171026172926.62d5ff87@archlinux> Content-Type: text/plain; charset=utf-8 Sender: linux-iio-owner@vger.kernel.org List-Id: linux-iio@vger.kernel.org >> @@ -596,6 +592,10 @@ static int max44000_probe(struct i2c_client *client, >> } >> >> return iio_device_register(indio_dev); >> + >> +report_failure: >> + dev_err(&client->dev, "failed to write init config: %d\n", ret); > This reduces readability of the code for a very minor gain. I got an other software development view on this aspect. > Printing an error message is not a source of bugs I find such a general information questionable. It is also possible to discover various update candidates in this software area. > or similar unlike unwinding some state, so a unified path makes little sense. How does such a view fit to the section “7) Centralized exiting of functions” in the document “coding-style.rst”? Regards, Markus