Revision d2c50b1cd94528aea8c8e9abb4cce81590f32cc4 authored by Wen Yang on 29 September 2019, 06:54:24 UTC, committed by David S. Miller on 01 October 2019, 17:01:58 UTC
of_node_put needs to be called when the device node which is got
from of_get_child_by_name finished using.
In both cases of success and failure, we need to release 'ports',
so clean up the code using goto.

fixes: a556c76adc05 ("net: mscc: Add initial Ocelot switch support")
Signed-off-by: Wen Yang <wenyang@linux.alibaba.com>
Cc: Alexandre Belloni <alexandre.belloni@bootlin.com>
Cc: Microchip Linux Driver Support <UNGLinuxDriver@microchip.com>
Cc: "David S. Miller" <davem@davemloft.net>
Cc: netdev@vger.kernel.org
Cc: linux-kernel@vger.kernel.org
Signed-off-by: David S. Miller <davem@davemloft.net>
1 parent 83c8c3c
Raw File
Makefile.modsign
# SPDX-License-Identifier: GPL-2.0
# ==========================================================================
# Signing modules
# ==========================================================================

PHONY := __modsign
__modsign:

include scripts/Kbuild.include

modules := $(sort $(shell cat modules.order))

PHONY += $(modules)
__modsign: $(modules)
	@:

quiet_cmd_sign_ko = SIGN [M] $(2)/$(notdir $@)
        cmd_sign_ko = $(mod_sign_cmd) $(2)/$(notdir $@)

# Modules built outside the kernel source tree go into extra by default
INSTALL_MOD_DIR ?= extra
ext-mod-dir = $(INSTALL_MOD_DIR)$(subst $(patsubst %/,%,$(KBUILD_EXTMOD)),,$(@D))

modinst_dir = $(if $(KBUILD_EXTMOD),$(ext-mod-dir),kernel/$(@D))

$(modules):
	$(call cmd,sign_ko,$(MODLIB)/$(modinst_dir))

.PHONY: $(PHONY)
back to top