Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 304746
b: refs/heads/master
c: e278df1
h: refs/heads/master
v: v3
  • Loading branch information
Peter Meerwald authored and Greg Kroah-Hartman committed May 17, 2012
1 parent b6bd2b8 commit c3e0bee
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 2 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 13f6eb69b15beeeaa720293c1281a14413363876
refs/heads/master: e278df1c82144f796fbeb5d9148ce09d544179a4
7 changes: 6 additions & 1 deletion trunk/drivers/staging/iio/magnetometer/hmc5843.c
Original file line number Diff line number Diff line change
Expand Up @@ -281,9 +281,14 @@ static ssize_t hmc5843_set_measurement_configuration(struct device *dev,
struct i2c_client *client = to_i2c_client(indio_dev->dev.parent);
struct hmc5843_data *data = iio_priv(indio_dev);
unsigned long meas_conf = 0;
int error = kstrtoul(buf, 10, &meas_conf);
int error;

error = kstrtoul(buf, 10, &meas_conf);
if (error)
return error;
if (meas_conf >= HMC5843_MEAS_CONF_NOT_USED)
return -EINVAL;

mutex_lock(&data->lock);

dev_dbg(dev, "set mode to %lu\n", meas_conf);
Expand Down

0 comments on commit c3e0bee

Please sign in to comment.