Skip to content

Commit bec4e76

Browse files
elohim-etzkardebayan
authored andcommitted
eccci: Fix atomic_set() return value usage
Signed-off-by: Naveen <133593113+elohim-etz@users.noreply.github.com>
1 parent f3cc935 commit bec4e76

3 files changed

Lines changed: 14 additions & 9 deletions

File tree

drivers/misc/mediatek/eccci/hif/ccci_hif_ccif.h

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -245,7 +245,8 @@ static inline int ccci_ccif_hif_set_wakeup_src(unsigned char hif_id, int value)
245245
if (ccif_rx_ch & AP_MD_CCB_WAKEUP)
246246
mtk_ccci_ccb_info_peek();
247247
#endif
248-
return atomic_set(&md_ctrl->wakeup_src, value);
248+
atomic_set(&md_ctrl->wakeup_src, value);
249+
return 0;
249250
} else
250251
return -1;
251252
}

drivers/misc/mediatek/eccci/hif/ccci_hif_cldma.h

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -423,10 +423,12 @@ static inline int ccci_cldma_hif_set_wakeup_src(unsigned char hif_id,
423423
struct md_cd_ctrl *md_ctrl =
424424
(struct md_cd_ctrl *)ccci_hif_get_by_id(hif_id);
425425

426-
if (md_ctrl)
427-
return atomic_set(&md_ctrl->wakeup_src, value);
428-
else
429-
return -1;
426+
if (md_ctrl) {
427+
atomic_set(&md_ctrl->wakeup_src, value);
428+
return 0;
429+
} else {
430+
return -1;
431+
}
430432

431433
}
432434

drivers/misc/mediatek/eccci/hif/ccci_hif_dpmaif.h

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -458,10 +458,12 @@ static inline int ccci_dpmaif_hif_set_wakeup_src(unsigned char hif_id,
458458
struct hif_dpmaif_ctrl *hif_ctrl =
459459
(struct hif_dpmaif_ctrl *)ccci_hif_get_by_id(hif_id);
460460

461-
if (hif_ctrl)
462-
return atomic_set(&hif_ctrl->wakeup_src, value);
463-
else
464-
return -1;
461+
if (hif_ctrl) {
462+
atomic_set(&hif_ctrl->wakeup_src, value);
463+
return 0;
464+
} else {
465+
return -1;
466+
}
465467

466468
}
467469

0 commit comments

Comments
 (0)