Skip to content

Commit

Permalink
ice: remove dead code for allocating pin_config
Browse files Browse the repository at this point in the history
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 <jacob.e.keller@intel.com>
Tested-by: Gurucharan G <gurucharanx.g@intel.com>
Signed-off-by: Tony Nguyen <anthony.l.nguyen@intel.com>
  • Loading branch information
jacob-keller authored and anguy11 committed Aug 27, 2021
1 parent 84c5fb8 commit 1f0cbb3
Showing 1 changed file with 0 additions and 11 deletions.
11 changes: 0 additions & 11 deletions drivers/net/ethernet/intel/ice/ice_ptp.c
Original file line number Diff line number Diff line change
Expand Up @@ -1064,17 +1064,6 @@ static long ice_ptp_create_clock(struct ice_pf *pf)
info = &pf->ptp.info;
dev = ice_pf_to_dev(pf);

/* Allocate memory for kernel pins interface */
if (info->n_pins) {
info->pin_config = devm_kcalloc(dev, info->n_pins,
sizeof(*info->pin_config),
GFP_KERNEL);
if (!info->pin_config) {
info->n_pins = 0;
return -ENOMEM;
}
}

/* Attempt to register the clock before enabling the hardware. */
clock = ptp_clock_register(info, dev);
if (IS_ERR(clock))
Expand Down

0 comments on commit 1f0cbb3

Please sign in to comment.