diff options
Diffstat (limited to 'drivers/input/mouse')
| -rw-r--r-- | drivers/input/mouse/elan_i2c_core.c | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/drivers/input/mouse/elan_i2c_core.c b/drivers/input/mouse/elan_i2c_core.c index fa945304b9a5..7cad81942b8c 100644 --- a/drivers/input/mouse/elan_i2c_core.c +++ b/drivers/input/mouse/elan_i2c_core.c | |||
| @@ -266,11 +266,10 @@ static int elan_query_device_info(struct elan_tp_data *data) | |||
| 266 | 266 | ||
| 267 | error = elan_get_fwinfo(data->iap_version, &data->fw_validpage_count, | 267 | error = elan_get_fwinfo(data->iap_version, &data->fw_validpage_count, |
| 268 | &data->fw_signature_address); | 268 | &data->fw_signature_address); |
| 269 | if (error) { | 269 | if (error) |
| 270 | dev_err(&data->client->dev, | 270 | dev_warn(&data->client->dev, |
| 271 | "unknown iap version %d\n", data->iap_version); | 271 | "unexpected iap version %#04x (ic type: %#04x), firmware update will not work\n", |
| 272 | return error; | 272 | data->iap_version, data->ic_type); |
| 273 | } | ||
| 274 | 273 | ||
| 275 | return 0; | 274 | return 0; |
| 276 | } | 275 | } |
| @@ -486,6 +485,9 @@ static ssize_t elan_sysfs_update_fw(struct device *dev, | |||
| 486 | const u8 *fw_signature; | 485 | const u8 *fw_signature; |
| 487 | static const u8 signature[] = {0xAA, 0x55, 0xCC, 0x33, 0xFF, 0xFF}; | 486 | static const u8 signature[] = {0xAA, 0x55, 0xCC, 0x33, 0xFF, 0xFF}; |
| 488 | 487 | ||
| 488 | if (data->fw_validpage_count == 0) | ||
| 489 | return -EINVAL; | ||
| 490 | |||
| 489 | /* Look for a firmware with the product id appended. */ | 491 | /* Look for a firmware with the product id appended. */ |
| 490 | fw_name = kasprintf(GFP_KERNEL, ETP_FW_NAME, data->product_id); | 492 | fw_name = kasprintf(GFP_KERNEL, ETP_FW_NAME, data->product_id); |
| 491 | if (!fw_name) { | 493 | if (!fw_name) { |
