projects
/
linux-2.6-block.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
e796c0c
)
platform/chrome: cros_ec_proto: remove redundant NULL check
author
Tzung-Bi Shih
<tzungbi@kernel.org>
Thu, 9 Jun 2022 08:49:41 +0000
(08:49 +0000)
committer
Tzung-Bi Shih
<tzungbi@kernel.org>
Fri, 10 Jun 2022 02:31:43 +0000
(
02:31
+0000)
send_command() already checks if `ec_dev->pkt_xfer` is NULL. Remove the
redundant check.
Reviewed-by: Guenter Roeck <groeck@chromium.org>
Signed-off-by: Tzung-Bi Shih <tzungbi@kernel.org>
Link:
https://lore.kernel.org/r/20220609084957.3684698-6-tzungbi@kernel.org
drivers/platform/chrome/cros_ec_proto.c
patch
|
blob
|
blame
|
history
diff --git
a/drivers/platform/chrome/cros_ec_proto.c
b/drivers/platform/chrome/cros_ec_proto.c
index 4977c8deb3ec60798cf873272cb9ac246d44f04f..1e01eb94fbee3564f4d1510217f96f41552accb4 100644
(file)
--- a/
drivers/platform/chrome/cros_ec_proto.c
+++ b/
drivers/platform/chrome/cros_ec_proto.c
@@
-281,9
+281,6
@@
static int cros_ec_host_command_proto_query(struct cros_ec_device *ec_dev,
*/
int ret;
- if (!ec_dev->pkt_xfer)
- return -EPROTONOSUPPORT;
-
memset(msg, 0, sizeof(*msg));
msg->command = EC_CMD_PASSTHRU_OFFSET(devidx) | EC_CMD_GET_PROTOCOL_INFO;
msg->insize = sizeof(struct ec_response_get_protocol_info);