|
@@ -377,7 +377,7 @@ static ssize_t ade7753_read_frequency(struct device *dev,
|
|
|
struct device_attribute *attr,
|
|
|
char *buf)
|
|
|
{
|
|
|
- int ret, len = 0;
|
|
|
+ int ret;
|
|
|
u16 t;
|
|
|
int sps;
|
|
|
ret = ade7753_spi_read_reg_16(dev, ADE7753_MODE, &t);
|
|
@@ -387,8 +387,7 @@ static ssize_t ade7753_read_frequency(struct device *dev,
|
|
|
t = (t >> 11) & 0x3;
|
|
|
sps = 27900 / (1 + t);
|
|
|
|
|
|
- len = sprintf(buf, "%d\n", sps);
|
|
|
- return len;
|
|
|
+ return sprintf(buf, "%d\n", sps);
|
|
|
}
|
|
|
|
|
|
static ssize_t ade7753_write_frequency(struct device *dev,
|