On Thu, Jul 29, 2021 at 04:30:30PM +0300, Shai Malin wrote: > From: Prabhakar Kushwaha <pkushwaha@xxxxxxxxxxx> > > This patch add support of get or set priority value for a given > dscp index. > > Signed-off-by: Shai Malin <smalin@xxxxxxxxxxx> > Signed-off-by: Ariel Elior <aelior@xxxxxxxxxxx> > Signed-off-by: Prabhakar Kushwaha <pkushwaha@xxxxxxxxxxx> > --- > drivers/net/ethernet/qlogic/qed/qed_dcbx.c | 65 ++++++++++++++++++++++ > drivers/net/ethernet/qlogic/qed/qed_dcbx.h | 9 +++ > include/linux/qed/qed_if.h | 6 ++ > 3 files changed, 80 insertions(+) > > diff --git a/drivers/net/ethernet/qlogic/qed/qed_dcbx.c b/drivers/net/ethernet/qlogic/qed/qed_dcbx.c > index e81dd34a3cac..ba9276599e72 100644 > --- a/drivers/net/ethernet/qlogic/qed/qed_dcbx.c > +++ b/drivers/net/ethernet/qlogic/qed/qed_dcbx.c > @@ -1280,6 +1280,71 @@ int qed_dcbx_get_config_params(struct qed_hwfn *p_hwfn, > return 0; > } <...> > + p_dcbx_info = kmalloc(sizeof(*p_dcbx_info), GFP_KERNEL); > + if (!p_dcbx_info) > + return -ENOMEM; > + > + memset(p_dcbx_info, 0, sizeof(*p_dcbx_info)); This is open-coded kzalloc(). Thanks