Skip to content

Commit 1f0cbb3

Browse files
jacob-kelleranguy11
authored andcommitted
ice: remove dead code for allocating pin_config
We have code in the ice driver which allocates the pin_config structure if n_pins is > 0, but we never set n_pins to be greater than zero. There's no reason to keep this code until we actually have pin_config support. Remove this. We can re-add it properly when we implement support for pin_config for E810-T devices. Fixes: 172db5f ("ice: add support for auxiliary input/output pins") Signed-off-by: Jacob Keller <[email protected]> Tested-by: Gurucharan G <[email protected]> Signed-off-by: Tony Nguyen <[email protected]>
1 parent 84c5fb8 commit 1f0cbb3

File tree

1 file changed

+0
-11
lines changed

1 file changed

+0
-11
lines changed

drivers/net/ethernet/intel/ice/ice_ptp.c

Lines changed: 0 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1064,17 +1064,6 @@ static long ice_ptp_create_clock(struct ice_pf *pf)
10641064
info = &pf->ptp.info;
10651065
dev = ice_pf_to_dev(pf);
10661066

1067-
/* Allocate memory for kernel pins interface */
1068-
if (info->n_pins) {
1069-
info->pin_config = devm_kcalloc(dev, info->n_pins,
1070-
sizeof(*info->pin_config),
1071-
GFP_KERNEL);
1072-
if (!info->pin_config) {
1073-
info->n_pins = 0;
1074-
return -ENOMEM;
1075-
}
1076-
}
1077-
10781067
/* Attempt to register the clock before enabling the hardware. */
10791068
clock = ptp_clock_register(info, dev);
10801069
if (IS_ERR(clock))

0 commit comments

Comments
 (0)