mirror of
https://github.com/hardkernel/linux.git
synced 2026-06-09 20:32:04 +09:00
irblaster: meson: fix Coverity errors [1/2]
PD#SWPL-13973 Problem: irblaster Coverity errors. Solution: 1. Properly release resources. 2. Fix return value type. Verify: test pass on g12a_u200_v1 Change-Id: I50054ba3ac9f02aeeaa005b7823416b1c4c9a196 Signed-off-by: Bichao Zheng <bichao.zheng@amlogic.com>
This commit is contained in:
committed by
Jianxin Pan
parent
302a65f334
commit
03a3cb46a6
@@ -97,7 +97,8 @@ int irblaster_nec_encode(enum irblaster_protocol protocol,
|
||||
unsigned int commmand,
|
||||
unsigned int *data)
|
||||
{
|
||||
u32 raw, ret;
|
||||
int ret;
|
||||
u32 raw;
|
||||
|
||||
if (protocol >= IRBLASTER_PROTOCOL_MAX)
|
||||
return -ENODEV;
|
||||
|
||||
@@ -61,7 +61,8 @@ static u32 irblaster_rca_scancode_to_raw(enum irblaster_protocol protocol,
|
||||
int irblaster_rca_encode(enum irblaster_protocol protocol, unsigned int addr,
|
||||
unsigned int commmand, unsigned int *data)
|
||||
{
|
||||
u32 raw, ret;
|
||||
int ret;
|
||||
u32 raw;
|
||||
|
||||
/* Convert a RCA scancode to raw rca data */
|
||||
raw = irblaster_rca_scancode_to_raw(protocol, addr, commmand);
|
||||
|
||||
@@ -47,6 +47,7 @@ static ssize_t send_store(struct device *dev,
|
||||
if (ret) {
|
||||
pr_err("Invalid tone\n");
|
||||
mutex_unlock(&chip->sys_lock);
|
||||
kfree(buffer);
|
||||
return ret;
|
||||
}
|
||||
buffer[m] = val * 10;
|
||||
|
||||
Reference in New Issue
Block a user