aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMichael Buesch <m@bues.ch>2016-08-08 00:15:44 +0200
committerMichael Buesch <m@bues.ch>2016-08-09 21:42:20 +0200
commit7a8cc0cef248c37f0d40a40b7403d014b1ce3c47 (patch)
treec8f545c5288211b68094e35094f8668bc60ade47
parentd1efcfdb12c387e42001b1738927c5c758b373f2 (diff)
downloadrazer-tmp-testing2.zip
razer-tmp-testing2.tar.xz
copperhead: Relax profile sanity checktmp-testing2
Signed-off-by: Michael Buesch <m@bues.ch>
-rw-r--r--librazer/hw_copperhead.c10
1 files changed, 6 insertions, 4 deletions
diff --git a/librazer/hw_copperhead.c b/librazer/hw_copperhead.c
index bf027e0..de94cc6 100644
--- a/librazer/hw_copperhead.c
+++ b/librazer/hw_copperhead.c
@@ -292,8 +292,9 @@ static int copperhead_read_config_from_hw(struct copperhead_private *priv)
if (err)
return err;
if (value < 1 || value > COPPERHEAD_NR_PROFILES) {
- razer_error("hw_copperhead: Got invalid profile number\n");
- return -EIO;
+ razer_error("hw_copperhead: Got invalid profile number: %u\n",
+ (unsigned int)value);
+ value = 1;
}
priv->cur_profile = &priv->profiles[value - 1];
@@ -319,8 +320,9 @@ static int copperhead_read_config_from_hw(struct copperhead_private *priv)
return -EIO;
}
if (le16_to_cpu(profcfg.reply_profilenr) != i + 1) {
- razer_error("hw_copperhead: Got invalid profile nr in profile config\n");
- return -EIO;
+ razer_error("hw_copperhead: Got invalid profile nr in "
+ "profile config: %u\n",
+ (unsigned int)le16_to_cpu(profcfg.reply_profilenr));
}
switch (profcfg.dpisel) {
case 4:
bues.ch cgit interface