Re: [PATCH] iio/light/max44000: Use common error handling code in max44000_probe()

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



>> @@ -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
--
To unsubscribe from this list: send the line "unsubscribe linux-iio" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html



[Index of Archives]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Input]     [Linux Kernel]     [Linux SCSI]     [X.org]

  Powered by Linux