diff options
| author | Peter Wu <[email protected]> | 2014-12-11 12:51:18 +0000 |
|---|---|---|
| committer | Jiri Kosina <[email protected]> | 2014-12-11 22:10:00 +0000 |
| commit | 1430ee73b566a30bc210501d1e0e99c519707f1e (patch) | |
| tree | b16d64b16d3f19f4675bc9787719795d1601d96c /drivers/net/xen-netback/interface.c | |
| parent | HID: logitech-hidpp: do not return the name length (diff) | |
| download | kernel-1430ee73b566a30bc210501d1e0e99c519707f1e.tar.gz kernel-1430ee73b566a30bc210501d1e0e99c519707f1e.zip | |
HID: logitech-hidpp: check name retrieval return code
hidpp_devicenametype_get_device_name() may return a negative value on
protocol errors (for example, when the device is powered off).
Explicitly check this condition to avoid a long-running loop.
(0 cannot be returned as __name_length - index > 0, but check for it
anyway as it would otherwise result in an infinite loop.)
Signed-off-by: Peter Wu <[email protected]>
Reviewed-by: Benjamin Tissoires <[email protected]>
Signed-off-by: Jiri Kosina <[email protected]>
Diffstat (limited to 'drivers/net/xen-netback/interface.c')
0 files changed, 0 insertions, 0 deletions
