mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
synced 2026-05-09 04:21:03 -04:00
media: venus: simplify the return expression of venus_sys_set_* function
Simplify the return expression. Signed-off-by: Liu Shixin <liushixin2@huawei.com> Reviewed-by: Bjorn Andersson <bjorn.andersson@linaro.org> Signed-off-by: Stanimir Varbanov <stanimir.k.varbanov@gmail.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@kernel.org>
This commit is contained in:
committed by
Mauro Carvalho Chehab
parent
98d4351847
commit
751be5c63f
@@ -835,34 +835,24 @@ static int venus_sys_set_debug(struct venus_hfi_device *hdev, u32 debug)
|
||||
{
|
||||
struct hfi_sys_set_property_pkt *pkt;
|
||||
u8 packet[IFACEQ_VAR_SMALL_PKT_SIZE];
|
||||
int ret;
|
||||
|
||||
pkt = (struct hfi_sys_set_property_pkt *)packet;
|
||||
|
||||
pkt_sys_debug_config(pkt, HFI_DEBUG_MODE_QUEUE, debug);
|
||||
|
||||
ret = venus_iface_cmdq_write(hdev, pkt, false);
|
||||
if (ret)
|
||||
return ret;
|
||||
|
||||
return 0;
|
||||
return venus_iface_cmdq_write(hdev, pkt, false);
|
||||
}
|
||||
|
||||
static int venus_sys_set_coverage(struct venus_hfi_device *hdev, u32 mode)
|
||||
{
|
||||
struct hfi_sys_set_property_pkt *pkt;
|
||||
u8 packet[IFACEQ_VAR_SMALL_PKT_SIZE];
|
||||
int ret;
|
||||
|
||||
pkt = (struct hfi_sys_set_property_pkt *)packet;
|
||||
|
||||
pkt_sys_coverage_config(pkt, mode);
|
||||
|
||||
ret = venus_iface_cmdq_write(hdev, pkt, false);
|
||||
if (ret)
|
||||
return ret;
|
||||
|
||||
return 0;
|
||||
return venus_iface_cmdq_write(hdev, pkt, false);
|
||||
}
|
||||
|
||||
static int venus_sys_set_idle_message(struct venus_hfi_device *hdev,
|
||||
@@ -870,7 +860,6 @@ static int venus_sys_set_idle_message(struct venus_hfi_device *hdev,
|
||||
{
|
||||
struct hfi_sys_set_property_pkt *pkt;
|
||||
u8 packet[IFACEQ_VAR_SMALL_PKT_SIZE];
|
||||
int ret;
|
||||
|
||||
if (!enable)
|
||||
return 0;
|
||||
@@ -879,11 +868,7 @@ static int venus_sys_set_idle_message(struct venus_hfi_device *hdev,
|
||||
|
||||
pkt_sys_idle_indicator(pkt, enable);
|
||||
|
||||
ret = venus_iface_cmdq_write(hdev, pkt, false);
|
||||
if (ret)
|
||||
return ret;
|
||||
|
||||
return 0;
|
||||
return venus_iface_cmdq_write(hdev, pkt, false);
|
||||
}
|
||||
|
||||
static int venus_sys_set_power_control(struct venus_hfi_device *hdev,
|
||||
@@ -891,17 +876,12 @@ static int venus_sys_set_power_control(struct venus_hfi_device *hdev,
|
||||
{
|
||||
struct hfi_sys_set_property_pkt *pkt;
|
||||
u8 packet[IFACEQ_VAR_SMALL_PKT_SIZE];
|
||||
int ret;
|
||||
|
||||
pkt = (struct hfi_sys_set_property_pkt *)packet;
|
||||
|
||||
pkt_sys_power_control(pkt, enable);
|
||||
|
||||
ret = venus_iface_cmdq_write(hdev, pkt, false);
|
||||
if (ret)
|
||||
return ret;
|
||||
|
||||
return 0;
|
||||
return venus_iface_cmdq_write(hdev, pkt, false);
|
||||
}
|
||||
|
||||
static int venus_sys_set_ubwc_config(struct venus_hfi_device *hdev)
|
||||
|
||||
Reference in New Issue
Block a user