summaryrefslogtreecommitdiff
path: root/drivers/platform/chrome/cros_ec_proto.c
diff options
context:
space:
mode:
authorTzung-Bi Shih <tzungbi@kernel.org>2022-06-09 11:49:41 +0300
committerTzung-Bi Shih <tzungbi@kernel.org>2022-06-10 05:31:43 +0300
commit8e3991610ba5c11003d8c228b280cc007c2a6177 (patch)
treef85dcad2cca6b7b5c0f05c1cce3c3f576fa6d826 /drivers/platform/chrome/cros_ec_proto.c
parente796c0c4b1ada2e038b22215d38ddc97153de053 (diff)
downloadlinux-8e3991610ba5c11003d8c228b280cc007c2a6177.tar.xz
platform/chrome: cros_ec_proto: remove redundant NULL check
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
Diffstat (limited to 'drivers/platform/chrome/cros_ec_proto.c')
-rw-r--r--drivers/platform/chrome/cros_ec_proto.c3
1 files changed, 0 insertions, 3 deletions
diff --git a/drivers/platform/chrome/cros_ec_proto.c b/drivers/platform/chrome/cros_ec_proto.c
index 4977c8deb3ec..1e01eb94fbee 100644
--- 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);