Skip to content

Commit 5f1d1d1

Browse files
aloktiwakuba-moo
authored andcommitted
net: ti: icss-iep: Fix incorrect type for return value in extts_enable()
The variable ret in icss_iep_extts_enable() was incorrectly declared as u32, while the function returns int and may return negative error codes. This will cause sign extension issues and incorrect error propagation. Update ret to be int to fix error handling. This change corrects the declaration to avoid potential type mismatch. Fixes: c1e0230 ("net: ti: icss-iep: Add IEP driver") Signed-off-by: Alok Tiwari <[email protected]> Reviewed-by: Andrew Lunn <[email protected]> Link: https://patch.msgid.link/[email protected] Signed-off-by: Jakub Kicinski <[email protected]>
1 parent 64fdaa9 commit 5f1d1d1

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

drivers/net/ethernet/ti/icssg/icss_iep.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -621,7 +621,8 @@ static int icss_iep_pps_enable(struct icss_iep *iep, int on)
621621

622622
static int icss_iep_extts_enable(struct icss_iep *iep, u32 index, int on)
623623
{
624-
u32 val, cap, ret = 0;
624+
u32 val, cap;
625+
int ret = 0;
625626

626627
mutex_lock(&iep->ptp_clk_mutex);
627628

0 commit comments

Comments
 (0)