diff options
author | Arnd Bergmann <arnd@arndb.de> | 2021-04-28 12:49:02 +0300 |
---|---|---|
committer | Arnd Bergmann <arnd@arndb.de> | 2021-04-28 12:49:03 +0300 |
commit | e393cc4e9ce015abc8a68c762dc361cdb0b0db96 (patch) | |
tree | 1f75d7689c7898b9c448367da4a323a483516d27 /drivers/firmware | |
parent | 774cda6f12d5ad11410c4cda223554c3735ee862 (diff) | |
parent | 03f840c49207e8c125b3df8c29c13137c6675d42 (diff) | |
download | linux-e393cc4e9ce015abc8a68c762dc361cdb0b0db96.tar.xz |
Merge tag 'scmi-fixes-5.13' of git://git.kernel.org/pub/scm/linux/kernel/git/sudeep.holla/linux into arm/fixes
ARM SCMI fixes for v5.13
A fix for very old possible ternary operation sign extention bug in the old
ARM SCPI firmware driver and a cleanup to remove duplicate structure declartion
in SCMI driver.
* tag 'scmi-fixes-5.13' of git://git.kernel.org/pub/scm/linux/kernel/git/sudeep.holla/linux:
firmware: arm_scmi: Remove duplicate declaration of struct scmi_protocol_handle
firmware: arm_scpi: Prevent the ternary sign expansion bug
Link: https://lore.kernel.org/r/20210428093148.flrcowzr2dsj7byz@bogus
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Diffstat (limited to 'drivers/firmware')
-rw-r--r-- | drivers/firmware/arm_scmi/notify.h | 2 | ||||
-rw-r--r-- | drivers/firmware/arm_scpi.c | 4 |
2 files changed, 3 insertions, 3 deletions
diff --git a/drivers/firmware/arm_scmi/notify.h b/drivers/firmware/arm_scmi/notify.h index ce0324be6c71..4e9b627edfef 100644 --- a/drivers/firmware/arm_scmi/notify.h +++ b/drivers/firmware/arm_scmi/notify.h @@ -79,8 +79,6 @@ struct scmi_protocol_events { int scmi_notification_init(struct scmi_handle *handle); void scmi_notification_exit(struct scmi_handle *handle); - -struct scmi_protocol_handle; int scmi_register_protocol_events(const struct scmi_handle *handle, u8 proto_id, const struct scmi_protocol_handle *ph, const struct scmi_protocol_events *ee); diff --git a/drivers/firmware/arm_scpi.c b/drivers/firmware/arm_scpi.c index d0dee37ad522..4ceba5ef7895 100644 --- a/drivers/firmware/arm_scpi.c +++ b/drivers/firmware/arm_scpi.c @@ -552,8 +552,10 @@ static unsigned long scpi_clk_get_val(u16 clk_id) ret = scpi_send_message(CMD_GET_CLOCK_VALUE, &le_clk_id, sizeof(le_clk_id), &rate, sizeof(rate)); + if (ret) + return 0; - return ret ? ret : le32_to_cpu(rate); + return le32_to_cpu(rate); } static int scpi_clk_set_val(u16 clk_id, unsigned long rate) |