File tree Expand file tree Collapse file tree 1 file changed +2
-3
lines changed Expand file tree Collapse file tree 1 file changed +2
-3
lines changed Original file line number Diff line number Diff line change @@ -153,7 +153,7 @@ int serdev_device_write(struct serdev_device *serdev,
153
153
unsigned long timeout )
154
154
{
155
155
struct serdev_controller * ctrl = serdev -> ctrl ;
156
- int ret , wr_cnt = 0 ;
156
+ int ret ;
157
157
158
158
if (!ctrl || !ctrl -> ops -> write_buf ||
159
159
(timeout && !serdev -> ops -> write_wakeup ))
@@ -169,13 +169,12 @@ int serdev_device_write(struct serdev_device *serdev,
169
169
170
170
buf += ret ;
171
171
count -= ret ;
172
- wr_cnt += ret ;
173
172
174
173
} while (count &&
175
174
(timeout = wait_for_completion_timeout (& serdev -> write_comp ,
176
175
timeout )));
177
176
mutex_unlock (& serdev -> write_lock );
178
- return ret < 0 ? ret : (count ? - ETIMEDOUT : wr_cnt );
177
+ return ret < 0 ? ret : (count ? - ETIMEDOUT : 0 );
179
178
}
180
179
EXPORT_SYMBOL_GPL (serdev_device_write );
181
180
You can’t perform that action at this time.
0 commit comments