[PATCH 2.6] New chip driver: pcf8591

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

 



> Sorry for the delay, this has now been applied, along with a few
> formatting changes, and one bugfix:
> 
> > +static ssize_t set_out0_output(struct device *dev, const char *buf,
> > size_t count)+{
> > +	unsigned int value;
> > +	struct i2c_client *client = to_i2c_client(dev);
> > +	struct pcf8591_data *data = i2c_get_clientdata(client);
> > +	if ((value = (simple_strtoul(buf, NULL, 10) + 5) / 10) <= 255);
> > +	{
> > +		data->aout = value;
> > +		i2c_smbus_write_byte_data(client, data->control, data->aout);
> > +	}
> > +	return count;
> > +}
> 
> I fixed that if statement above (you really didn't want that ';'
> there, right?

OMG, we missed that...

Nice catching Greg! :)

BTW, wouldn't a "else return -1" make sense here? Silently ignoring
errors doesn't sound good to me.

Sorry for not noticing this before.

-- 
Jean Delvare
http://www.ensicaen.ismra.fr/~delvare/



[Index of Archives]     [Linux Kernel]     [Linux Hardware Monitoring]     [Linux USB Devel]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [Yosemite Backpacking]

  Powered by Linux