Null-checking "p" suggests that it may be null, but it has already
been dereferenced on all paths leading to the check. Thus correct
the code lines and remove the redundant line.
Fixes:
c84f8aa2100c ("net/ice/base: add parser runtime skeleton")
Signed-off-by: Junfeng Guo <junfeng.guo@intel.com>
Acked-by: Qi Zhang <qi.z.zhang@intel.com>
struct ice_parser *p;
p = (struct ice_parser *)ice_malloc(hw, sizeof(struct ice_parser));
- p->hw = hw;
- p->rt.psr = p;
-
if (!p)
return ICE_ERR_NO_MEMORY;
p->hw = hw;
+ p->rt.psr = p;
p->imem_table = ice_imem_table_get(hw);
if (!p->imem_table) {