This is the 4.14.283 stable release

-----BEGIN PGP SIGNATURE-----
 
 iQIzBAABCAAdFiEEZH8oZUiU471FcZm+ONu9yGCSaT4FAmKooT0ACgkQONu9yGCS
 aT4WRg//cBOuzzGspuXoTaVb83KSr9BSsPK5pwEJyqk/6NG3aw9+xIXpD8etUkK1
 EPPVIjqxVbE7DndPh+QAw3FvujHGwA/0A4LIrXC8z1figqud7RwPbLtg+jVRS/kq
 +H9UbNWggXpBzOIsRUg1jp0Rq+erhNFg9xx5Y76ggPu9jhtIEsvF63hCD4lvsfjo
 sPQDxloMb0VmPqBJ6WY6HHBlPzNe8isnGmDNj6bOm0gg80t7xeR070xHYO2HORGG
 wPtJZek5r7AJyO7lwDrWBOQzsHSYFsUGzsoONkbUSaQ+9+nXN6nXDH5UALO+iqgz
 J7MG7qhe5IOq3XoUKgYwJD/GSBJUEFeMzwkzmFLrU13cuA0vNDB1vyqCamLTJNtS
 hKNi3bIONUe0tTgiBcJLnmMdpA01jWppcQ6YS2KiK2LYcKrHHxlFmlye7MaG/Dzr
 Px+UFmRraRJi2fBduRjzmdC7vZnZgY5e11gcB4Fr3RYfPNwjtHPBEWY5cSO8Rf3w
 z5v3LxWXIdiaTGo5/K0nG9Nx3uvAT3i223XvM1mi76oLaWw26e0iFjOo6LzQA6t5
 bzH3X1RPMkSllbuHguD11vMMqmkthIXsjuGwmPYDGpxGhEwdY5QqB5fuGce8UjQv
 KlyWM1obYephZtdlcm+wvmqWB3WuMXZLZDfRbmj2umIx+K09paE=
 =/LYT
 -----END PGP SIGNATURE-----

Merge 4.14.283 into android-4.14-stable

Changes in 4.14.283
	binfmt_flat: do not stop relocating GOT entries prematurely on riscv
	USB: serial: option: add Quectel BG95 modem
	USB: new quirk for Dell Gen 2 devices
	ptrace/xtensa: Replace PT_SINGLESTEP with TIF_SINGLESTEP
	ptrace: Reimplement PTRACE_KILL by always sending SIGKILL
	btrfs: add "0x" prefix for unsupported optional features
	btrfs: repair super block num_devices automatically
	drm/virtio: fix NULL pointer dereference in virtio_gpu_conn_get_modes
	mwifiex: add mutex lock for call in mwifiex_dfs_chan_sw_work_queue
	b43legacy: Fix assigning negative value to unsigned variable
	b43: Fix assigning negative value to unsigned variable
	ipw2x00: Fix potential NULL dereference in libipw_xmit()
	ACPICA: Avoid cache flush inside virtual machines
	ALSA: jack: Access input_dev under mutex
	drm/amd/pm: fix double free in si_parse_power_table()
	ath9k: fix QCA9561 PA bias level
	media: venus: hfi: avoid null dereference in deinit
	media: pci: cx23885: Fix the error handling in cx23885_initdev()
	media: cx25821: Fix the warning when removing the module
	scsi: megaraid: Fix error check return value of register_chrdev()
	drm/amd/pm: fix the compile warning
	ipv6: Don't send rs packets to the interface of ARPHRD_TUNNEL
	ASoC: dapm: Don't fold register value changes into notifications
	s390/preempt: disable __preempt_count_add() optimization for PROFILE_ALL_BRANCHES
	dma-debug: change allocation mode from GFP_NOWAIT to GFP_ATIOMIC
	ipmi:ssif: Check for NULL msg when handling events and messages
	rtlwifi: Use pr_warn instead of WARN_ONCE
	openrisc: start CPU timer early in boot
	nvme-pci: fix a NULL pointer dereference in nvme_alloc_admin_tags
	ASoC: rt5645: Fix errorenous cleanup order
	net: phy: micrel: Allow probing without .driver_data
	media: exynos4-is: Fix compile warning
	rxrpc: Return an error to sendmsg if call failed
	eth: tg3: silence the GCC 12 array-bounds warning
	ARM: dts: ox820: align interrupt controller node name with dtschema
	fs: jfs: fix possible NULL pointer dereference in dbFree()
	ARM: OMAP1: clock: Fix UART rate reporting algorithm
	fat: add ratelimit to fat*_ent_bread()
	ARM: versatile: Add missing of_node_put in dcscb_init
	ARM: dts: exynos: add atmel,24c128 fallback to Samsung EEPROM
	ARM: hisi: Add missing of_node_put after of_find_compatible_node
	PCI: Avoid pci_dev_lock() AB/BA deadlock with sriov_numvfs_store()
	tracing: incorrect isolate_mote_t cast in mm_vmscan_lru_isolate
	powerpc/xics: fix refcount leak in icp_opal_init()
	macintosh/via-pmu: Fix build failure when CONFIG_INPUT is disabled
	RDMA/hfi1: Prevent panic when SDMA is disabled
	drm: fix EDID struct for old ARM OABI format
	ath9k: fix ar9003_get_eepmisc
	ASoC: mediatek: Fix error handling in mt8173_max98090_dev_probe
	ASoC: mediatek: Fix missing of_node_put in mt2701_wm8960_machine_probe
	x86/delay: Fix the wrong asm constraint in delay_loop()
	drm/mediatek: Fix mtk_cec_mask()
	spi: spi-ti-qspi: Fix return value handling of wait_for_completion_timeout
	NFC: NULL out the dev->rfkill to prevent UAF
	efi: Add missing prototype for efi_capsule_setup_info
	HID: hid-led: fix maximum brightness for Dream Cheeky
	spi: img-spfi: Fix pm_runtime_get_sync() error checking
	ath9k_htc: fix potential out of bounds access with invalid rxstatus->rs_keyix
	inotify: show inotify mask flags in proc fdinfo
	fsnotify: fix wrong lockdep annotations
	x86/pm: Fix false positive kmemleak report in msr_build_context()
	drm/msm/dsi: fix error checks and return values for DSI xmit functions
	drm/msm/hdmi: check return value after calling platform_get_resource_byname()
	drm/rockchip: vop: fix possible null-ptr-deref in vop_bind()
	x86: Fix return value of __setup handlers
	irqchip/aspeed-i2c-ic: Fix irq_of_parse_and_map() return value
	x86/mm: Cleanup the control_va_addr_alignment() __setup handler
	drm/msm: return an error pointer in msm_gem_prime_get_sg_table()
	media: uvcvideo: Fix missing check to determine if element is found in list
	ASoC: mxs-saif: Fix refcount leak in mxs_saif_probe
	regulator: pfuze100: Fix refcount leak in pfuze_parse_regulators_dt
	media: st-delta: Fix PM disable depth imbalance in delta_probe
	media: exynos4-is: Change clk_disable to clk_disable_unprepare
	media: pvrusb2: fix array-index-out-of-bounds in pvr2_i2c_core_init
	Bluetooth: fix dangling sco_conn and use-after-free in sco_sock_timeout
	m68k: math-emu: Fix dependencies of math emulation support
	sctp: read sk->sk_bound_dev_if once in sctp_rcv()
	ASoC: wm2000: fix missing clk_disable_unprepare() on error in wm2000_anc_transition()
	rxrpc: Fix listen() setting the bar too high for the prealloc rings
	rxrpc: Don't try to resend the request if we're receiving the reply
	soc: qcom: smp2p: Fix missing of_node_put() in smp2p_parse_ipc
	soc: qcom: smsm: Fix missing of_node_put() in smsm_parse_ipc
	ARM: dts: bcm2835-rpi-zero-w: Fix GPIO line name for Wifi/BT
	ARM: dts: bcm2835-rpi-b: Fix GPIO line names
	mfd: ipaq-micro: Fix error check return value of platform_get_irq()
	scsi: fcoe: Fix Wstringop-overflow warnings in fcoe_wwn_from_mac()
	pinctrl: mvebu: Fix irq_of_parse_and_map() return value
	drivers/base/node.c: fix compaction sysfs file leak
	powerpc/8xx: export 'cpm_setbrg' for modules
	powerpc/idle: Fix return value of __setup() handler
	powerpc/4xx/cpm: Fix return value of __setup() handler
	tty: fix deadlock caused by calling printk() under tty_port->lock
	Input: sparcspkr - fix refcount leak in bbc_beep_probe
	powerpc/perf: Fix the threshold compare group constraint for power9
	powerpc/fsl_rio: Fix refcount leak in fsl_rio_setup
	mailbox: forward the hrtimer if not queued and under a lock
	iommu/mediatek: Add list_del in mtk_iommu_remove
	video: fbdev: clcdfb: Fix refcount leak in clcdfb_of_vram_setup
	iommu/amd: Increase timeout waiting for GA log enablement
	perf c2c: Use stdio interface if slang is not supported
	perf jevents: Fix event syntax error caused by ExtSel
	wifi: mac80211: fix use-after-free in chanctx code
	iwlwifi: mvm: fix assert 1F04 upon reconfig
	fs-writeback: writeback_sb_inodes:Recalculate 'wrote' according skipped pages
	ext4: fix use-after-free in ext4_rename_dir_prepare
	ext4: fix bug_on in ext4_writepages
	ext4: verify dir block before splitting it
	ext4: avoid cycles in directory h-tree
	dlm: fix plock invalid read
	dlm: fix missing lkb refcount handling
	ocfs2: dlmfs: fix error handling of user_dlm_destroy_lock
	scsi: dc395x: Fix a missing check on list iterator
	scsi: ufs: qcom: Add a readl() to make sure ref_clk gets enabled
	drm/amdgpu/cs: make commands with 0 chunks illegal behaviour.
	drm/nouveau/clk: Fix an incorrect NULL check on list iterator
	drm/bridge: analogix_dp: Grab runtime PM reference for DP-AUX
	md: fix an incorrect NULL check in does_sb_need_changing
	md: fix an incorrect NULL check in md_reload_sb
	RDMA/hfi1: Fix potential integer multiplication overflow errors
	irqchip/armada-370-xp: Do not touch Performance Counter Overflow on A375, A38x, A39x
	irqchip: irq-xtensa-mx: fix initial IRQ affinity
	mac80211: upgrade passive scan to active scan on DFS channels after beacon rx
	um: chan_user: Fix winch_tramp() return value
	um: Fix out-of-bounds read in LDT setup
	iommu/msm: Fix an incorrect NULL check on list iterator
	nodemask.h: fix compilation error with GCC12
	hugetlb: fix huge_pmd_unshare address update
	rtl818x: Prevent using not initialized queues
	ASoC: rt5514: Fix event generation for "DSP Voice Wake Up" control
	carl9170: tx: fix an incorrect use of list iterator
	gma500: fix an incorrect NULL check on list iterator
	arm64: dts: qcom: ipq8074: fix the sleep clock frequency
	phy: qcom-qmp: fix struct clk leak on probe errors
	docs/conf.py: Cope with removal of language=None in Sphinx 5.0.0
	dt-bindings: gpio: altera: correct interrupt-cells
	phy: qcom-qmp: fix reset-controller leak on probe errors
	RDMA/rxe: Generate a completion for unsupported/invalid opcode
	MIPS: IP27: Remove incorrect `cpu_has_fpu' override
	netfilter: nf_tables: disallow non-stateful expression in sets earlier
	pcmcia: db1xxx_ss: restrict to MIPS_DB1XXX boards
	staging: greybus: codecs: fix type confusion of list iterator variable
	tty: goldfish: Use tty_port_destroy() to destroy port
	usb: usbip: fix a refcount leak in stub_probe()
	usb: usbip: add missing device lock on tweak configuration cmd
	USB: storage: karma: fix rio_karma_init return
	pwm: lp3943: Fix duty calculation in case period was clamped
	rpmsg: qcom_smd: Fix irq_of_parse_and_map() return value
	coresight: cpu-debug: Replace mutex with mutex_trylock on panic notifier
	soc: rockchip: Fix refcount leak in rockchip_grf_init
	rtc: mt6397: check return value after calling platform_get_resource()
	serial: meson: acquire port->lock in startup()
	serial: digicolor-usart: Don't allow CS5-6
	serial: txx9: Don't allow CS5-6
	serial: sh-sci: Don't allow CS5-6
	serial: st-asc: Sanitize CSIZE and correct PARENB for CS7
	firmware: dmi-sysfs: Fix memory leak in dmi_sysfs_register_handle
	clocksource/drivers/oxnas-rps: Fix irq_of_parse_and_map() return value
	net: ethernet: mtk_eth_soc: out of bounds read in mtk_hwlro_get_fdir_entry()
	net: dsa: mv88e6xxx: Fix refcount leak in mv88e6xxx_mdios_register
	modpost: fix removing numeric suffixes
	jffs2: fix memory leak in jffs2_do_fill_super
	ubi: ubi_create_volume: Fix use-after-free when volume creation failed
	tcp: tcp_rtx_synack() can be called from process context
	perf c2c: Fix sorting in percent_rmt_hitm_cmp()
	mips: cpc: Fix refcount leak in mips_cpc_default_phys_base
	tracing: Fix sleeping function called from invalid context on RT kernel
	tracing: Avoid adding tracer option before update_tracer_options
	i2c: cadence: Increase timeout per message if necessary
	m68knommu: set ZERO_PAGE() to the allocated zeroed page
	m68knommu: fix undefined reference to `_init_sp'
	video: fbdev: pxa3xx-gcu: release the resources correctly in pxa3xx_gcu_probe/remove()
	xprtrdma: treat all calls not a bcall when bc_serv is NULL
	ata: pata_octeon_cf: Fix refcount leak in octeon_cf_probe
	net/mlx4_en: Fix wrong return value on ioctl EEPROM query failure
	SUNRPC: Fix the calculation of xdr->end in xdr_get_next_encode_buffer()
	net: mdio: unexport __init-annotated mdio_bus_init()
	net: xfrm: unexport __init-annotated xfrm4_protocol_init()
	net: ipv6: unexport __init-annotated seg6_hmac_init()
	net: altera: Fix refcount leak in altera_tse_mdio_create
	drm: imx: fix compiler warning with gcc-12
	iio: dummy: iio_simple_dummy: check the return value of kstrdup()
	lkdtm/usercopy: Expand size of "out of frame" object
	tty: synclink_gt: Fix null-pointer-dereference in slgt_clean()
	tty: Fix a possible resource leak in icom_probe
	drivers: staging: rtl8192e: Fix deadlock in rtllib_beacons_stop()
	USB: host: isp116x: check return value after calling platform_get_resource()
	drivers: tty: serial: Fix deadlock in sa1100_set_termios()
	drivers: usb: host: Fix deadlock in oxu_bus_suspend()
	USB: hcd-pci: Fully suspend across freeze/thaw cycle
	usb: dwc2: gadget: don't reset gadget's driver->bus
	misc: rtsx: set NULL intfdata when probe fails
	extcon: Modify extcon device to be created after driver data is set
	clocksource/drivers/sp804: Avoid error on multiple instances
	staging: rtl8712: fix uninit-value in r871xu_drv_init()
	serial: msm_serial: disable interrupts in __msm_console_write()
	kernfs: Separate kernfs_pr_cont_buf and rename_lock.
	md: protect md_unregister_thread from reentrancy
	Revert "net: af_key: add check for pfkey_broadcast in function pfkey_process"
	drm/radeon: fix a possible null pointer dereference
	modpost: fix undefined behavior of is_arm_mapping_symbol()
	nbd: call genl_unregister_family() first in nbd_cleanup()
	nbd: fix race between nbd_alloc_config() and module removal
	nbd: fix io hung while disconnecting device
	nodemask: Fix return values to be unsigned
	vringh: Fix loop descriptors check in the indirect cases
	ALSA: hda/conexant - Fix loopback issue with CX20632
	cifs: return errors during session setup during reconnects
	ata: libata-transport: fix {dma|pio|xfer}_mode sysfs files
	nfc: st21nfca: fix incorrect validating logic in EVT_TRANSACTION
	nfc: st21nfca: fix memory leaks in EVT_TRANSACTION handling
	ixgbe: fix bcast packets Rx on VF after promisc removal
	ixgbe: fix unexpected VLAN Rx in promisc mode on VF
	Input: bcm5974 - set missing URB_NO_TRANSFER_DMA_MAP urb flag
	powerpc/32: Fix overread/overwrite of thread_struct via ptrace
	md/raid0: Ignore RAID0 layout if the second zone has only one device
	mtd: cfi_cmdset_0002: Move and rename chip_check/chip_ready/chip_good_for_write
	mtd: cfi_cmdset_0002: Use chip_ready() for write on S29GL064N
	PCI: qcom: Fix unbalanced PHY init on probe errors
	tcp: fix tcp_mtup_probe_success vs wrong snd_cwnd
	Linux 4.14.283

Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
Change-Id: Ied22d0825be1474eb1388684d690c7c40d8fe891
This commit is contained in:
Greg Kroah-Hartman 2022-06-14 17:05:02 +02:00
commit bc1a5b8c02
225 changed files with 1104 additions and 523 deletions

View File

@ -59,17 +59,18 @@ class
dma_mode dma_mode
Transfer modes supported by the device when in DMA mode. DMA transfer mode used by the device.
Mostly used by PATA device. Mostly used by PATA device.
pio_mode pio_mode
Transfer modes supported by the device when in PIO mode. PIO transfer mode used by the device.
Mostly used by PATA device. Mostly used by PATA device.
xfer_mode xfer_mode
Current transfer mode. Current transfer mode.
Mostly used by PATA device.
id id

View File

@ -96,7 +96,7 @@ finally:
# #
# This is also used if you do content translation via gettext catalogs. # This is also used if you do content translation via gettext catalogs.
# Usually you set "language" from the command line for these cases. # Usually you set "language" from the command line for these cases.
language = None language = 'en'
# There are two options for replacing |today|: either, you set today to some # There are two options for replacing |today|: either, you set today to some
# non-false value, then it is used: # non-false value, then it is used:

View File

@ -9,8 +9,9 @@ Required properties:
- The second cell is reserved and is currently unused. - The second cell is reserved and is currently unused.
- gpio-controller : Marks the device node as a GPIO controller. - gpio-controller : Marks the device node as a GPIO controller.
- interrupt-controller: Mark the device node as an interrupt controller - interrupt-controller: Mark the device node as an interrupt controller
- #interrupt-cells : Should be 1. The interrupt type is fixed in the hardware. - #interrupt-cells : Should be 2. The interrupt type is fixed in the hardware.
- The first cell is the GPIO offset number within the GPIO controller. - The first cell is the GPIO offset number within the GPIO controller.
- The second cell is the interrupt trigger type and level flags.
- interrupts: Specify the interrupt. - interrupts: Specify the interrupt.
- altr,interrupt-type: Specifies the interrupt trigger type the GPIO - altr,interrupt-type: Specifies the interrupt trigger type the GPIO
hardware is synthesized. This field is required if the Altera GPIO controller hardware is synthesized. This field is required if the Altera GPIO controller
@ -38,6 +39,6 @@ gpio_altr: gpio@0xff200000 {
altr,interrupt-type = <IRQ_TYPE_EDGE_RISING>; altr,interrupt-type = <IRQ_TYPE_EDGE_RISING>;
#gpio-cells = <2>; #gpio-cells = <2>;
gpio-controller; gpio-controller;
#interrupt-cells = <1>; #interrupt-cells = <2>;
interrupt-controller; interrupt-controller;
}; };

View File

@ -1,7 +1,7 @@
# SPDX-License-Identifier: GPL-2.0 # SPDX-License-Identifier: GPL-2.0
VERSION = 4 VERSION = 4
PATCHLEVEL = 14 PATCHLEVEL = 14
SUBLEVEL = 282 SUBLEVEL = 283
EXTRAVERSION = EXTRAVERSION =
NAME = Petit Gorille NAME = Petit Gorille

View File

@ -48,18 +48,17 @@
"GPIO18", "GPIO18",
"NC", /* GPIO19 */ "NC", /* GPIO19 */
"NC", /* GPIO20 */ "NC", /* GPIO20 */
"GPIO21", "CAM_GPIO0",
"GPIO22", "GPIO22",
"GPIO23", "GPIO23",
"GPIO24", "GPIO24",
"GPIO25", "GPIO25",
"NC", /* GPIO26 */ "NC", /* GPIO26 */
"CAM_GPIO0", "GPIO27",
/* Binary number representing build/revision */ "GPIO28",
"CONFIG0", "GPIO29",
"CONFIG1", "GPIO30",
"CONFIG2", "GPIO31",
"CONFIG3",
"NC", /* GPIO32 */ "NC", /* GPIO32 */
"NC", /* GPIO33 */ "NC", /* GPIO33 */
"NC", /* GPIO34 */ "NC", /* GPIO34 */

View File

@ -77,16 +77,18 @@
"GPIO27", "GPIO27",
"SDA0", "SDA0",
"SCL0", "SCL0",
"NC", /* GPIO30 */ /* Used by BT module */
"NC", /* GPIO31 */ "CTS0",
"NC", /* GPIO32 */ "RTS0",
"NC", /* GPIO33 */ "TXD0",
"NC", /* GPIO34 */ "RXD0",
"NC", /* GPIO35 */ /* Used by Wifi */
"NC", /* GPIO36 */ "SD1_CLK",
"NC", /* GPIO37 */ "SD1_CMD",
"NC", /* GPIO38 */ "SD1_DATA0",
"NC", /* GPIO39 */ "SD1_DATA1",
"SD1_DATA2",
"SD1_DATA3",
"CAM_GPIO1", /* GPIO40 */ "CAM_GPIO1", /* GPIO40 */
"WL_ON", /* GPIO41 */ "WL_ON", /* GPIO41 */
"NC", /* GPIO42 */ "NC", /* GPIO42 */

View File

@ -128,7 +128,7 @@
samsung,i2c-max-bus-freq = <20000>; samsung,i2c-max-bus-freq = <20000>;
eeprom@50 { eeprom@50 {
compatible = "samsung,s524ad0xd1"; compatible = "samsung,s524ad0xd1", "atmel,24c128";
reg = <0x50>; reg = <0x50>;
}; };
@ -287,7 +287,7 @@
samsung,i2c-max-bus-freq = <20000>; samsung,i2c-max-bus-freq = <20000>;
eeprom@51 { eeprom@51 {
compatible = "samsung,s524ad0xd1"; compatible = "samsung,s524ad0xd1", "atmel,24c128";
reg = <0x51>; reg = <0x51>;
}; };

View File

@ -286,7 +286,7 @@
clocks = <&armclk>; clocks = <&armclk>;
}; };
gic: gic@1000 { gic: interrupt-controller@1000 {
compatible = "arm,arm11mp-gic"; compatible = "arm,arm11mp-gic";
interrupt-controller; interrupt-controller;
#interrupt-cells = <3>; #interrupt-cells = <3>;

View File

@ -70,14 +70,17 @@ static void __init hi3xxx_smp_prepare_cpus(unsigned int max_cpus)
} }
ctrl_base = of_iomap(np, 0); ctrl_base = of_iomap(np, 0);
if (!ctrl_base) { if (!ctrl_base) {
of_node_put(np);
pr_err("failed to map address\n"); pr_err("failed to map address\n");
return; return;
} }
if (of_property_read_u32(np, "smp-offset", &offset) < 0) { if (of_property_read_u32(np, "smp-offset", &offset) < 0) {
of_node_put(np);
pr_err("failed to find smp-offset property\n"); pr_err("failed to find smp-offset property\n");
return; return;
} }
ctrl_base += offset; ctrl_base += offset;
of_node_put(np);
} }
} }
@ -163,6 +166,7 @@ static int hip01_boot_secondary(unsigned int cpu, struct task_struct *idle)
if (WARN_ON(!node)) if (WARN_ON(!node))
return -1; return -1;
ctrl_base = of_iomap(node, 0); ctrl_base = of_iomap(node, 0);
of_node_put(node);
/* set the secondary core boot from DDR */ /* set the secondary core boot from DDR */
remap_reg_value = readl_relaxed(ctrl_base + REG_SC_CTRL); remap_reg_value = readl_relaxed(ctrl_base + REG_SC_CTRL);

View File

@ -44,7 +44,7 @@ static DEFINE_SPINLOCK(clockfw_lock);
unsigned long omap1_uart_recalc(struct clk *clk) unsigned long omap1_uart_recalc(struct clk *clk)
{ {
unsigned int val = __raw_readl(clk->enable_reg); unsigned int val = __raw_readl(clk->enable_reg);
return val & clk->enable_bit ? 48000000 : 12000000; return val & 1 << clk->enable_bit ? 48000000 : 12000000;
} }
unsigned long omap1_sossi_recalc(struct clk *clk) unsigned long omap1_sossi_recalc(struct clk *clk)

View File

@ -146,6 +146,7 @@ static int __init dcscb_init(void)
if (!node) if (!node)
return -ENODEV; return -ENODEV;
dcscb_base = of_iomap(node, 0); dcscb_base = of_iomap(node, 0);
of_node_put(node);
if (!dcscb_base) if (!dcscb_base)
return -EADDRNOTAVAIL; return -EADDRNOTAVAIL;
cfg = readl_relaxed(dcscb_base + DCS_CFG_R); cfg = readl_relaxed(dcscb_base + DCS_CFG_R);

View File

@ -181,7 +181,7 @@
clocks { clocks {
sleep_clk: sleep_clk { sleep_clk: sleep_clk {
compatible = "fixed-clock"; compatible = "fixed-clock";
clock-frequency = <32000>; clock-frequency = <32768>;
#clock-cells = <0>; #clock-cells = <0>;
}; };

View File

@ -308,7 +308,7 @@ comment "Processor Specific Options"
config M68KFPU_EMU config M68KFPU_EMU
bool "Math emulation support" bool "Math emulation support"
depends on MMU depends on M68KCLASSIC && FPU
help help
At some point in the future, this will cause floating-point math At some point in the future, this will cause floating-point math
instructions to be emulated by the kernel on machines that lack a instructions to be emulated by the kernel on machines that lack a

View File

@ -309,6 +309,7 @@ comment "Machine Options"
config UBOOT config UBOOT
bool "Support for U-Boot command line parameters" bool "Support for U-Boot command line parameters"
depends on COLDFIRE
help help
If you say Y here kernel will try to collect command If you say Y here kernel will try to collect command
line parameters from the initial u-boot stack. line parameters from the initial u-boot stack.

View File

@ -42,7 +42,8 @@ extern void paging_init(void);
* ZERO_PAGE is a global shared page that is always zero: used * ZERO_PAGE is a global shared page that is always zero: used
* for zero-mapped memory areas etc.. * for zero-mapped memory areas etc..
*/ */
#define ZERO_PAGE(vaddr) (virt_to_page(0)) extern void *empty_zero_page;
#define ZERO_PAGE(vaddr) (virt_to_page(empty_zero_page))
/* /*
* No page table caches to initialise. * No page table caches to initialise.

View File

@ -28,7 +28,6 @@
#define cpu_has_6k_cache 0 #define cpu_has_6k_cache 0
#define cpu_has_8k_cache 0 #define cpu_has_8k_cache 0
#define cpu_has_tx39_cache 0 #define cpu_has_tx39_cache 0
#define cpu_has_fpu 1
#define cpu_has_nofpuex 0 #define cpu_has_nofpuex 0
#define cpu_has_32fpr 1 #define cpu_has_32fpr 1
#define cpu_has_counter 1 #define cpu_has_counter 1

View File

@ -31,6 +31,7 @@ phys_addr_t __weak mips_cpc_default_phys_base(void)
cpc_node = of_find_compatible_node(of_root, NULL, "mti,mips-cpc"); cpc_node = of_find_compatible_node(of_root, NULL, "mti,mips-cpc");
if (cpc_node) { if (cpc_node) {
err = of_address_to_resource(cpc_node, 0, &res); err = of_address_to_resource(cpc_node, 0, &res);
of_node_put(cpc_node);
if (!err) if (!err)
return res.start; return res.start;
} }

View File

@ -27,6 +27,7 @@ static inline cycles_t get_cycles(void)
{ {
return mfspr(SPR_TTCR); return mfspr(SPR_TTCR);
} }
#define get_cycles get_cycles
/* This isn't really used any more */ /* This isn't really used any more */
#define CLOCK_TICK_RATE 1000 #define CLOCK_TICK_RATE 1000

View File

@ -459,6 +459,15 @@ _start:
l.ori r3,r0,0x1 l.ori r3,r0,0x1
l.mtspr r0,r3,SPR_SR l.mtspr r0,r3,SPR_SR
/*
* Start the TTCR as early as possible, so that the RNG can make use of
* measurements of boot time from the earliest opportunity. Especially
* important is that the TTCR does not return zero by the time we reach
* rand_initialize().
*/
l.movhi r3,hi(SPR_TTMR_CR)
l.mtspr r0,r3,SPR_TTMR
CLEAR_GPR(r1) CLEAR_GPR(r1)
CLEAR_GPR(r2) CLEAR_GPR(r2)
CLEAR_GPR(r3) CLEAR_GPR(r3)

View File

@ -41,7 +41,7 @@ static int __init powersave_off(char *arg)
{ {
ppc_md.power_save = NULL; ppc_md.power_save = NULL;
cpuidle_disable = IDLE_POWERSAVE_OFF; cpuidle_disable = IDLE_POWERSAVE_OFF;
return 0; return 1;
} }
__setup("powersave=off", powersave_off); __setup("powersave=off", powersave_off);

View File

@ -2920,8 +2920,13 @@ long arch_ptrace(struct task_struct *child, long request,
flush_fp_to_thread(child); flush_fp_to_thread(child);
if (fpidx < (PT_FPSCR - PT_FPR0)) if (fpidx < (PT_FPSCR - PT_FPR0))
memcpy(&tmp, &child->thread.TS_FPR(fpidx), if (IS_ENABLED(CONFIG_PPC32)) {
sizeof(long)); // On 32-bit the index we are passed refers to 32-bit words
tmp = ((u32 *)child->thread.fp_state.fpr)[fpidx];
} else {
memcpy(&tmp, &child->thread.TS_FPR(fpidx),
sizeof(long));
}
else else
tmp = child->thread.fp_state.fpscr; tmp = child->thread.fp_state.fpscr;
} }
@ -2953,8 +2958,13 @@ long arch_ptrace(struct task_struct *child, long request,
flush_fp_to_thread(child); flush_fp_to_thread(child);
if (fpidx < (PT_FPSCR - PT_FPR0)) if (fpidx < (PT_FPSCR - PT_FPR0))
memcpy(&child->thread.TS_FPR(fpidx), &data, if (IS_ENABLED(CONFIG_PPC32)) {
sizeof(long)); // On 32-bit the index we are passed refers to 32-bit words
((u32 *)child->thread.fp_state.fpr)[fpidx] = data;
} else {
memcpy(&child->thread.TS_FPR(fpidx), &data,
sizeof(long));
}
else else
child->thread.fp_state.fpscr = data; child->thread.fp_state.fpscr = data;
ret = 0; ret = 0;

View File

@ -324,7 +324,8 @@ int isa207_get_constraint(u64 event, unsigned long *maskp, unsigned long *valp)
if (event_is_threshold(event) && is_thresh_cmp_valid(event)) { if (event_is_threshold(event) && is_thresh_cmp_valid(event)) {
mask |= CNST_THRESH_MASK; mask |= CNST_THRESH_MASK;
value |= CNST_THRESH_VAL(event >> EVENT_THRESH_SHIFT); value |= CNST_THRESH_VAL(event >> EVENT_THRESH_SHIFT);
} } else if (event_is_threshold(event))
return -1;
} else { } else {
/* /*
* Special case for PM_MRK_FAB_RSP_MATCH and PM_MRK_FAB_RSP_MATCH_CYC, * Special case for PM_MRK_FAB_RSP_MATCH and PM_MRK_FAB_RSP_MATCH_CYC,

View File

@ -341,6 +341,6 @@ late_initcall(cpm_init);
static int __init cpm_powersave_off(char *arg) static int __init cpm_powersave_off(char *arg)
{ {
cpm.powersave_off = 1; cpm.powersave_off = 1;
return 0; return 1;
} }
__setup("powersave=off", cpm_powersave_off); __setup("powersave=off", cpm_powersave_off);

View File

@ -291,6 +291,7 @@ cpm_setbrg(uint brg, uint rate)
out_be32(bp, (((BRG_UART_CLK_DIV16 / rate) - 1) << 1) | out_be32(bp, (((BRG_UART_CLK_DIV16 / rate) - 1) << 1) |
CPM_BRG_EN | CPM_BRG_DIV16); CPM_BRG_EN | CPM_BRG_DIV16);
} }
EXPORT_SYMBOL(cpm_setbrg);
struct cpm_ioport16 { struct cpm_ioport16 {
__be16 dir, par, odr_sor, dat, intr; __be16 dir, par, odr_sor, dat, intr;

View File

@ -509,8 +509,10 @@ int fsl_rio_setup(struct platform_device *dev)
if (rc) { if (rc) {
dev_err(&dev->dev, "Can't get %pOF property 'reg'\n", dev_err(&dev->dev, "Can't get %pOF property 'reg'\n",
rmu_node); rmu_node);
of_node_put(rmu_node);
goto err_rmu; goto err_rmu;
} }
of_node_put(rmu_node);
rmu_regs_win = ioremap(rmu_regs.start, resource_size(&rmu_regs)); rmu_regs_win = ioremap(rmu_regs.start, resource_size(&rmu_regs));
if (!rmu_regs_win) { if (!rmu_regs_win) {
dev_err(&dev->dev, "Unable to map rmu register window\n"); dev_err(&dev->dev, "Unable to map rmu register window\n");

View File

@ -199,6 +199,7 @@ int icp_opal_init(void)
printk("XICS: Using OPAL ICP fallbacks\n"); printk("XICS: Using OPAL ICP fallbacks\n");
of_node_put(np);
return 0; return 0;
} }

View File

@ -50,10 +50,17 @@ static inline bool test_preempt_need_resched(void)
static inline void __preempt_count_add(int val) static inline void __preempt_count_add(int val)
{ {
if (__builtin_constant_p(val) && (val >= -128) && (val <= 127)) /*
__atomic_add_const(val, &S390_lowcore.preempt_count); * With some obscure config options and CONFIG_PROFILE_ALL_BRANCHES
else * enabled, gcc 12 fails to handle __builtin_constant_p().
__atomic_add(val, &S390_lowcore.preempt_count); */
if (!IS_ENABLED(CONFIG_PROFILE_ALL_BRANCHES)) {
if (__builtin_constant_p(val) && (val >= -128) && (val <= 127)) {
__atomic_add_const(val, &S390_lowcore.preempt_count);
return;
}
}
__atomic_add(val, &S390_lowcore.preempt_count);
} }
static inline void __preempt_count_sub(int val) static inline void __preempt_count_sub(int val)

View File

@ -220,7 +220,7 @@ static int winch_tramp(int fd, struct tty_port *port, int *fd_out,
unsigned long *stack_out) unsigned long *stack_out)
{ {
struct winch_data data; struct winch_data data;
int fds[2], n, err; int fds[2], n, err, pid;
char c; char c;
err = os_pipe(fds, 1, 1); err = os_pipe(fds, 1, 1);
@ -238,8 +238,9 @@ static int winch_tramp(int fd, struct tty_port *port, int *fd_out,
* problem with /dev/net/tun, which if held open by this * problem with /dev/net/tun, which if held open by this
* thread, prevents the TUN/TAP device from being reused. * thread, prevents the TUN/TAP device from being reused.
*/ */
err = run_helper_thread(winch_thread, &data, CLONE_FILES, stack_out); pid = run_helper_thread(winch_thread, &data, CLONE_FILES, stack_out);
if (err < 0) { if (pid < 0) {
err = pid;
printk(UM_KERN_ERR "fork of winch_thread failed - errno = %d\n", printk(UM_KERN_ERR "fork of winch_thread failed - errno = %d\n",
-err); -err);
goto out_close; goto out_close;
@ -263,7 +264,7 @@ static int winch_tramp(int fd, struct tty_port *port, int *fd_out,
goto out_close; goto out_close;
} }
return err; return pid;
out_close: out_close:
close(fds[1]); close(fds[1]);

View File

@ -328,7 +328,7 @@ int arch_setup_additional_pages(struct linux_binprm *bprm, int uses_interp)
static __init int vdso_setup(char *s) static __init int vdso_setup(char *s)
{ {
vdso64_enabled = simple_strtoul(s, NULL, 0); vdso64_enabled = simple_strtoul(s, NULL, 0);
return 0; return 1;
} }
__setup("vdso=", vdso_setup); __setup("vdso=", vdso_setup);
#endif #endif

View File

@ -16,7 +16,19 @@
/* Asm macros */ /* Asm macros */
#define ACPI_FLUSH_CPU_CACHE() wbinvd() /*
* ACPI_FLUSH_CPU_CACHE() flushes caches on entering sleep states.
* It is required to prevent data loss.
*
* While running inside virtual machine, the kernel can bypass cache flushing.
* Changing sleep state in a virtual machine doesn't affect the host system
* sleep state and cannot lead to data loss.
*/
#define ACPI_FLUSH_CPU_CACHE() \
do { \
if (!cpu_feature_enabled(X86_FEATURE_HYPERVISOR)) \
wbinvd(); \
} while (0)
int __acpi_acquire_global_lock(unsigned int *lock); int __acpi_acquire_global_lock(unsigned int *lock);
int __acpi_release_global_lock(unsigned int *lock); int __acpi_release_global_lock(unsigned int *lock);

View File

@ -21,7 +21,6 @@ struct saved_context {
#endif #endif
unsigned long cr0, cr2, cr3, cr4; unsigned long cr0, cr2, cr3, cr4;
u64 misc_enable; u64 misc_enable;
bool misc_enable_saved;
struct saved_msrs saved_msrs; struct saved_msrs saved_msrs;
struct desc_ptr gdt_desc; struct desc_ptr gdt_desc;
struct desc_ptr idt; struct desc_ptr idt;
@ -30,6 +29,7 @@ struct saved_context {
unsigned long tr; unsigned long tr;
unsigned long safety; unsigned long safety;
unsigned long return_address; unsigned long return_address;
bool misc_enable_saved;
} __attribute__((packed)); } __attribute__((packed));
#endif /* _ASM_X86_SUSPEND_32_H */ #endif /* _ASM_X86_SUSPEND_32_H */

View File

@ -14,9 +14,13 @@
* Image of the saved processor state, used by the low level ACPI suspend to * Image of the saved processor state, used by the low level ACPI suspend to
* RAM code and by the low level hibernation code. * RAM code and by the low level hibernation code.
* *
* If you modify it, fix arch/x86/kernel/acpi/wakeup_64.S and make sure that * If you modify it, check how it is used in arch/x86/kernel/acpi/wakeup_64.S
* __save/__restore_processor_state(), defined in arch/x86/kernel/suspend_64.c, * and make sure that __save/__restore_processor_state(), defined in
* still work as required. * arch/x86/power/cpu.c, still work as required.
*
* Because the structure is packed, make sure to avoid unaligned members. For
* optimisation purposes but also because tools like kmemleak only search for
* pointers that are aligned.
*/ */
struct saved_context { struct saved_context {
struct pt_regs regs; struct pt_regs regs;
@ -36,7 +40,6 @@ struct saved_context {
unsigned long cr0, cr2, cr3, cr4, cr8; unsigned long cr0, cr2, cr3, cr4, cr8;
u64 misc_enable; u64 misc_enable;
bool misc_enable_saved;
struct saved_msrs saved_msrs; struct saved_msrs saved_msrs;
unsigned long efer; unsigned long efer;
u16 gdt_pad; /* Unused */ u16 gdt_pad; /* Unused */
@ -48,6 +51,7 @@ struct saved_context {
unsigned long tr; unsigned long tr;
unsigned long safety; unsigned long safety;
unsigned long return_address; unsigned long return_address;
bool misc_enable_saved;
} __attribute__((packed)); } __attribute__((packed));
#define loaddebug(thread,register) \ #define loaddebug(thread,register) \

View File

@ -167,7 +167,7 @@ static __init int setup_apicpmtimer(char *s)
{ {
apic_calibrate_pmtmr = 1; apic_calibrate_pmtmr = 1;
notsc_setup(NULL); notsc_setup(NULL);
return 0; return 1;
} }
__setup("apicpmtimer", setup_apicpmtimer); __setup("apicpmtimer", setup_apicpmtimer);
#endif #endif

View File

@ -71,7 +71,7 @@ static bool ring3mwait_disabled __read_mostly;
static int __init ring3mwait_disable(char *__unused) static int __init ring3mwait_disable(char *__unused)
{ {
ring3mwait_disabled = true; ring3mwait_disabled = true;
return 0; return 1;
} }
__setup("ring3mwait=disable", ring3mwait_disable); __setup("ring3mwait=disable", ring3mwait_disable);

View File

@ -175,8 +175,7 @@ void set_task_blockstep(struct task_struct *task, bool on)
* *
* NOTE: this means that set/clear TIF_BLOCKSTEP is only safe if * NOTE: this means that set/clear TIF_BLOCKSTEP is only safe if
* task is current or it can't be running, otherwise we can race * task is current or it can't be running, otherwise we can race
* with __switch_to_xtra(). We rely on ptrace_freeze_traced() but * with __switch_to_xtra(). We rely on ptrace_freeze_traced().
* PTRACE_KILL is not safe.
*/ */
local_irq_disable(); local_irq_disable();
debugctl = get_debugctlmsr(); debugctl = get_debugctlmsr();

View File

@ -70,9 +70,6 @@ static int __init control_va_addr_alignment(char *str)
if (*str == 0) if (*str == 0)
return 1; return 1;
if (*str == '=')
str++;
if (!strcmp(str, "32")) if (!strcmp(str, "32"))
va_align.flags = ALIGN_VA_32; va_align.flags = ALIGN_VA_32;
else if (!strcmp(str, "64")) else if (!strcmp(str, "64"))
@ -82,11 +79,11 @@ static int __init control_va_addr_alignment(char *str)
else if (!strcmp(str, "on")) else if (!strcmp(str, "on"))
va_align.flags = ALIGN_VA_32 | ALIGN_VA_64; va_align.flags = ALIGN_VA_32 | ALIGN_VA_64;
else else
return 0; pr_warn("invalid option value: 'align_va_addr=%s'\n", str);
return 1; return 1;
} }
__setup("align_va_addr", control_va_addr_alignment); __setup("align_va_addr=", control_va_addr_alignment);
SYSCALL_DEFINE6(mmap, unsigned long, addr, unsigned long, len, SYSCALL_DEFINE6(mmap, unsigned long, addr, unsigned long, len,
unsigned long, prot, unsigned long, flags, unsigned long, prot, unsigned long, flags,

View File

@ -43,8 +43,8 @@ static void delay_loop(unsigned long loops)
" jnz 2b \n" " jnz 2b \n"
"3: dec %0 \n" "3: dec %0 \n"
: /* we don't need output */ : "+a" (loops)
:"a" (loops) :
); );
} }

View File

@ -74,7 +74,7 @@ int pat_debug_enable;
static int __init pat_debug_setup(char *str) static int __init pat_debug_setup(char *str)
{ {
pat_debug_enable = 1; pat_debug_enable = 1;
return 0; return 1;
} }
__setup("debugpat", pat_debug_setup); __setup("debugpat", pat_debug_setup);

View File

@ -23,9 +23,11 @@ static long write_ldt_entry(struct mm_id *mm_idp, int func,
{ {
long res; long res;
void *stub_addr; void *stub_addr;
BUILD_BUG_ON(sizeof(*desc) % sizeof(long));
res = syscall_stub_data(mm_idp, (unsigned long *)desc, res = syscall_stub_data(mm_idp, (unsigned long *)desc,
(sizeof(*desc) + sizeof(long) - 1) & sizeof(*desc) / sizeof(long),
~(sizeof(long) - 1),
addr, &stub_addr); addr, &stub_addr);
if (!res) { if (!res) {
unsigned long args[] = { func, unsigned long args[] = { func,

View File

@ -35,12 +35,12 @@
void user_enable_single_step(struct task_struct *child) void user_enable_single_step(struct task_struct *child)
{ {
child->ptrace |= PT_SINGLESTEP; set_tsk_thread_flag(child, TIF_SINGLESTEP);
} }
void user_disable_single_step(struct task_struct *child) void user_disable_single_step(struct task_struct *child)
{ {
child->ptrace &= ~PT_SINGLESTEP; clear_tsk_thread_flag(child, TIF_SINGLESTEP);
} }
/* /*

View File

@ -459,7 +459,7 @@ static void do_signal(struct pt_regs *regs)
/* Set up the stack frame */ /* Set up the stack frame */
ret = setup_frame(&ksig, sigmask_to_save(), regs); ret = setup_frame(&ksig, sigmask_to_save(), regs);
signal_setup_done(ret, &ksig, 0); signal_setup_done(ret, &ksig, 0);
if (current->ptrace & PT_SINGLESTEP) if (test_thread_flag(TIF_SINGLESTEP))
task_pt_regs(current)->icountlevel = 1; task_pt_regs(current)->icountlevel = 1;
return; return;
@ -485,7 +485,7 @@ static void do_signal(struct pt_regs *regs)
/* If there's no signal to deliver, we just restore the saved mask. */ /* If there's no signal to deliver, we just restore the saved mask. */
restore_saved_sigmask(); restore_saved_sigmask();
if (current->ptrace & PT_SINGLESTEP) if (test_thread_flag(TIF_SINGLESTEP))
task_pt_regs(current)->icountlevel = 1; task_pt_regs(current)->icountlevel = 1;
return; return;
} }

View File

@ -196,7 +196,7 @@ static struct {
{ XFER_PIO_0, "XFER_PIO_0" }, { XFER_PIO_0, "XFER_PIO_0" },
{ XFER_PIO_SLOW, "XFER_PIO_SLOW" } { XFER_PIO_SLOW, "XFER_PIO_SLOW" }
}; };
ata_bitfield_name_match(xfer,ata_xfer_names) ata_bitfield_name_search(xfer, ata_xfer_names)
/* /*
* ATA Port attributes * ATA Port attributes

View File

@ -888,12 +888,14 @@ static int octeon_cf_probe(struct platform_device *pdev)
int i; int i;
res_dma = platform_get_resource(dma_dev, IORESOURCE_MEM, 0); res_dma = platform_get_resource(dma_dev, IORESOURCE_MEM, 0);
if (!res_dma) { if (!res_dma) {
put_device(&dma_dev->dev);
of_node_put(dma_node); of_node_put(dma_node);
return -EINVAL; return -EINVAL;
} }
cf_port->dma_base = (u64)devm_ioremap_nocache(&pdev->dev, res_dma->start, cf_port->dma_base = (u64)devm_ioremap_nocache(&pdev->dev, res_dma->start,
resource_size(res_dma)); resource_size(res_dma));
if (!cf_port->dma_base) { if (!cf_port->dma_base) {
put_device(&dma_dev->dev);
of_node_put(dma_node); of_node_put(dma_node);
return -EINVAL; return -EINVAL;
} }
@ -903,6 +905,7 @@ static int octeon_cf_probe(struct platform_device *pdev)
irq = i; irq = i;
irq_handler = octeon_cf_interrupt; irq_handler = octeon_cf_interrupt;
} }
put_device(&dma_dev->dev);
} }
of_node_put(dma_node); of_node_put(dma_node);
} }

View File

@ -348,6 +348,7 @@ static int register_node(struct node *node, int num)
*/ */
void unregister_node(struct node *node) void unregister_node(struct node *node)
{ {
compaction_unregister_node(node);
hugetlb_unregister_node(node); /* no-op, if memoryless node */ hugetlb_unregister_node(node); /* no-op, if memoryless node */
device_unregister(&node->dev); device_unregister(&node->dev);

View File

@ -1275,7 +1275,7 @@ static int nbd_start_device_ioctl(struct nbd_device *nbd, struct block_device *b
static void nbd_clear_sock_ioctl(struct nbd_device *nbd, static void nbd_clear_sock_ioctl(struct nbd_device *nbd,
struct block_device *bdev) struct block_device *bdev)
{ {
sock_shutdown(nbd); nbd_clear_sock(nbd);
__invalidate_device(bdev, true); __invalidate_device(bdev, true);
nbd_bdev_reset(bdev); nbd_bdev_reset(bdev);
if (test_and_clear_bit(NBD_HAS_CONFIG_REF, if (test_and_clear_bit(NBD_HAS_CONFIG_REF,
@ -1382,15 +1382,20 @@ static struct nbd_config *nbd_alloc_config(void)
{ {
struct nbd_config *config; struct nbd_config *config;
if (!try_module_get(THIS_MODULE))
return ERR_PTR(-ENODEV);
config = kzalloc(sizeof(struct nbd_config), GFP_NOFS); config = kzalloc(sizeof(struct nbd_config), GFP_NOFS);
if (!config) if (!config) {
return NULL; module_put(THIS_MODULE);
return ERR_PTR(-ENOMEM);
}
atomic_set(&config->recv_threads, 0); atomic_set(&config->recv_threads, 0);
init_waitqueue_head(&config->recv_wq); init_waitqueue_head(&config->recv_wq);
init_waitqueue_head(&config->conn_wait); init_waitqueue_head(&config->conn_wait);
config->blksize = NBD_DEF_BLKSIZE; config->blksize = NBD_DEF_BLKSIZE;
atomic_set(&config->live_connections, 0); atomic_set(&config->live_connections, 0);
try_module_get(THIS_MODULE);
return config; return config;
} }
@ -1417,12 +1422,13 @@ static int nbd_open(struct block_device *bdev, fmode_t mode)
mutex_unlock(&nbd->config_lock); mutex_unlock(&nbd->config_lock);
goto out; goto out;
} }
config = nbd->config = nbd_alloc_config(); config = nbd_alloc_config();
if (!config) { if (IS_ERR(config)) {
ret = -ENOMEM; ret = PTR_ERR(config);
mutex_unlock(&nbd->config_lock); mutex_unlock(&nbd->config_lock);
goto out; goto out;
} }
nbd->config = config;
refcount_set(&nbd->config_refs, 1); refcount_set(&nbd->config_refs, 1);
refcount_inc(&nbd->refs); refcount_inc(&nbd->refs);
mutex_unlock(&nbd->config_lock); mutex_unlock(&nbd->config_lock);
@ -1803,13 +1809,14 @@ again:
nbd_put(nbd); nbd_put(nbd);
return -EINVAL; return -EINVAL;
} }
config = nbd->config = nbd_alloc_config(); config = nbd_alloc_config();
if (!nbd->config) { if (IS_ERR(config)) {
mutex_unlock(&nbd->config_lock); mutex_unlock(&nbd->config_lock);
nbd_put(nbd); nbd_put(nbd);
printk(KERN_ERR "nbd: couldn't allocate config\n"); printk(KERN_ERR "nbd: couldn't allocate config\n");
return -ENOMEM; return PTR_ERR(config);
} }
nbd->config = config;
refcount_set(&nbd->config_refs, 1); refcount_set(&nbd->config_refs, 1);
set_bit(NBD_BOUND, &config->runtime_flags); set_bit(NBD_BOUND, &config->runtime_flags);
@ -2319,6 +2326,12 @@ static void __exit nbd_cleanup(void)
struct nbd_device *nbd; struct nbd_device *nbd;
LIST_HEAD(del_list); LIST_HEAD(del_list);
/*
* Unregister netlink interface prior to waiting
* for the completion of netlink commands.
*/
genl_unregister_family(&nbd_genl_family);
nbd_dbg_close(); nbd_dbg_close();
mutex_lock(&nbd_index_mutex); mutex_lock(&nbd_index_mutex);
@ -2328,13 +2341,15 @@ static void __exit nbd_cleanup(void)
while (!list_empty(&del_list)) { while (!list_empty(&del_list)) {
nbd = list_first_entry(&del_list, struct nbd_device, list); nbd = list_first_entry(&del_list, struct nbd_device, list);
list_del_init(&nbd->list); list_del_init(&nbd->list);
if (refcount_read(&nbd->config_refs))
printk(KERN_ERR "nbd: possibly leaking nbd_config (ref %d)\n",
refcount_read(&nbd->config_refs));
if (refcount_read(&nbd->refs) != 1) if (refcount_read(&nbd->refs) != 1)
printk(KERN_ERR "nbd: possibly leaking a device\n"); printk(KERN_ERR "nbd: possibly leaking a device\n");
nbd_put(nbd); nbd_put(nbd);
} }
idr_destroy(&nbd_index_idr); idr_destroy(&nbd_index_idr);
genl_unregister_family(&nbd_genl_family);
unregister_blkdev(NBD_MAJOR, "nbd"); unregister_blkdev(NBD_MAJOR, "nbd");
} }

View File

@ -816,6 +816,14 @@ static void msg_done_handler(struct ssif_info *ssif_info, int result,
break; break;
case SSIF_GETTING_EVENTS: case SSIF_GETTING_EVENTS:
if (!msg) {
/* Should never happen, but just in case. */
dev_warn(&ssif_info->client->dev,
"No message set while getting events\n");
ipmi_ssif_unlock_cond(ssif_info, flags);
break;
}
if ((result < 0) || (len < 3) || (msg->rsp[2] != 0)) { if ((result < 0) || (len < 3) || (msg->rsp[2] != 0)) {
/* Error getting event, probably done. */ /* Error getting event, probably done. */
msg->done(msg); msg->done(msg);
@ -839,6 +847,14 @@ static void msg_done_handler(struct ssif_info *ssif_info, int result,
break; break;
case SSIF_GETTING_MESSAGES: case SSIF_GETTING_MESSAGES:
if (!msg) {
/* Should never happen, but just in case. */
dev_warn(&ssif_info->client->dev,
"No message set while getting messages\n");
ipmi_ssif_unlock_cond(ssif_info, flags);
break;
}
if ((result < 0) || (len < 3) || (msg->rsp[2] != 0)) { if ((result < 0) || (len < 3) || (msg->rsp[2] != 0)) {
/* Error getting event, probably done. */ /* Error getting event, probably done. */
msg->done(msg); msg->done(msg);
@ -861,6 +877,13 @@ static void msg_done_handler(struct ssif_info *ssif_info, int result,
deliver_recv_msg(ssif_info, msg); deliver_recv_msg(ssif_info, msg);
} }
break; break;
default:
/* Should never happen, but just in case. */
dev_warn(&ssif_info->client->dev,
"Invalid state in message done handling: %d\n",
ssif_info->ssif_state);
ipmi_ssif_unlock_cond(ssif_info, flags);
} }
flags = ipmi_ssif_lock_cond(ssif_info, &oflags); flags = ipmi_ssif_lock_cond(ssif_info, &oflags);

View File

@ -247,7 +247,7 @@ static int __init oxnas_rps_timer_init(struct device_node *np)
} }
rps->irq = irq_of_parse_and_map(np, 0); rps->irq = irq_of_parse_and_map(np, 0);
if (rps->irq < 0) { if (!rps->irq) {
ret = -EINVAL; ret = -EINVAL;
goto err_iomap; goto err_iomap;
} }

View File

@ -227,6 +227,11 @@ static int __init sp804_of_init(struct device_node *np)
struct clk *clk1, *clk2; struct clk *clk1, *clk2;
const char *name = of_get_property(np, "compatible", NULL); const char *name = of_get_property(np, "compatible", NULL);
if (initialized) {
pr_debug("%pOF: skipping further SP804 timer device\n", np);
return 0;
}
base = of_iomap(np, 0); base = of_iomap(np, 0);
if (!base) if (!base)
return -ENXIO; return -ENXIO;
@ -235,11 +240,6 @@ static int __init sp804_of_init(struct device_node *np)
writel(0, base + TIMER_CTRL); writel(0, base + TIMER_CTRL);
writel(0, base + TIMER_2_BASE + TIMER_CTRL); writel(0, base + TIMER_2_BASE + TIMER_CTRL);
if (initialized || !of_device_is_available(np)) {
ret = -EINVAL;
goto err;
}
clk1 = of_clk_get(np, 0); clk1 = of_clk_get(np, 0);
if (IS_ERR(clk1)) if (IS_ERR(clk1))
clk1 = NULL; clk1 = NULL;

View File

@ -1241,19 +1241,14 @@ int extcon_dev_register(struct extcon_dev *edev)
edev->dev.type = &edev->extcon_dev_type; edev->dev.type = &edev->extcon_dev_type;
} }
ret = device_register(&edev->dev);
if (ret) {
put_device(&edev->dev);
goto err_dev;
}
spin_lock_init(&edev->lock); spin_lock_init(&edev->lock);
edev->nh = devm_kcalloc(&edev->dev, edev->max_supported, if (edev->max_supported) {
sizeof(*edev->nh), GFP_KERNEL); edev->nh = kcalloc(edev->max_supported, sizeof(*edev->nh),
if (!edev->nh) { GFP_KERNEL);
ret = -ENOMEM; if (!edev->nh) {
device_unregister(&edev->dev); ret = -ENOMEM;
goto err_dev; goto err_alloc_nh;
}
} }
for (index = 0; index < edev->max_supported; index++) for (index = 0; index < edev->max_supported; index++)
@ -1264,6 +1259,12 @@ int extcon_dev_register(struct extcon_dev *edev)
dev_set_drvdata(&edev->dev, edev); dev_set_drvdata(&edev->dev, edev);
edev->state = 0; edev->state = 0;
ret = device_register(&edev->dev);
if (ret) {
put_device(&edev->dev);
goto err_dev;
}
mutex_lock(&extcon_dev_list_lock); mutex_lock(&extcon_dev_list_lock);
list_add(&edev->entry, &extcon_dev_list); list_add(&edev->entry, &extcon_dev_list);
mutex_unlock(&extcon_dev_list_lock); mutex_unlock(&extcon_dev_list_lock);
@ -1271,6 +1272,9 @@ int extcon_dev_register(struct extcon_dev *edev)
return 0; return 0;
err_dev: err_dev:
if (edev->max_supported)
kfree(edev->nh);
err_alloc_nh:
if (edev->max_supported) if (edev->max_supported)
kfree(edev->extcon_dev_type.groups); kfree(edev->extcon_dev_type.groups);
err_alloc_groups: err_alloc_groups:
@ -1331,6 +1335,7 @@ void extcon_dev_unregister(struct extcon_dev *edev)
if (edev->max_supported) { if (edev->max_supported) {
kfree(edev->extcon_dev_type.groups); kfree(edev->extcon_dev_type.groups);
kfree(edev->cables); kfree(edev->cables);
kfree(edev->nh);
} }
put_device(&edev->dev); put_device(&edev->dev);

View File

@ -602,7 +602,7 @@ static void __init dmi_sysfs_register_handle(const struct dmi_header *dh,
"%d-%d", dh->type, entry->instance); "%d-%d", dh->type, entry->instance);
if (*ret) { if (*ret) {
kfree(entry); kobject_put(&entry->kobj);
return; return;
} }

View File

@ -84,7 +84,7 @@ static int amdgpu_cs_parser_init(struct amdgpu_cs_parser *p, void *data)
int ret; int ret;
if (cs->in.num_chunks == 0) if (cs->in.num_chunks == 0)
return 0; return -EINVAL;
chunk_array = kmalloc_array(cs->in.num_chunks, sizeof(uint64_t), GFP_KERNEL); chunk_array = kmalloc_array(cs->in.num_chunks, sizeof(uint64_t), GFP_KERNEL);
if (!chunk_array) if (!chunk_array)

View File

@ -1608,19 +1608,7 @@ static int kv_update_samu_dpm(struct amdgpu_device *adev, bool gate)
static u8 kv_get_acp_boot_level(struct amdgpu_device *adev) static u8 kv_get_acp_boot_level(struct amdgpu_device *adev)
{ {
u8 i; return 0;
struct amdgpu_clock_voltage_dependency_table *table =
&adev->pm.dpm.dyn_state.acp_clock_voltage_dependency_table;
for (i = 0; i < table->count; i++) {
if (table->entries[i].clk >= 0) /* XXX */
break;
}
if (i >= table->count)
i = table->count - 1;
return i;
} }
static void kv_update_acp_boot_level(struct amdgpu_device *adev) static void kv_update_acp_boot_level(struct amdgpu_device *adev)

View File

@ -7238,17 +7238,15 @@ static int si_parse_power_table(struct amdgpu_device *adev)
if (!adev->pm.dpm.ps) if (!adev->pm.dpm.ps)
return -ENOMEM; return -ENOMEM;
power_state_offset = (u8 *)state_array->states; power_state_offset = (u8 *)state_array->states;
for (i = 0; i < state_array->ucNumEntries; i++) { for (adev->pm.dpm.num_ps = 0, i = 0; i < state_array->ucNumEntries; i++) {
u8 *idx; u8 *idx;
power_state = (union pplib_power_state *)power_state_offset; power_state = (union pplib_power_state *)power_state_offset;
non_clock_array_index = power_state->v2.nonClockInfoIndex; non_clock_array_index = power_state->v2.nonClockInfoIndex;
non_clock_info = (struct _ATOM_PPLIB_NONCLOCK_INFO *) non_clock_info = (struct _ATOM_PPLIB_NONCLOCK_INFO *)
&non_clock_info_array->nonClockInfo[non_clock_array_index]; &non_clock_info_array->nonClockInfo[non_clock_array_index];
ps = kzalloc(sizeof(struct si_ps), GFP_KERNEL); ps = kzalloc(sizeof(struct si_ps), GFP_KERNEL);
if (ps == NULL) { if (ps == NULL)
kfree(adev->pm.dpm.ps);
return -ENOMEM; return -ENOMEM;
}
adev->pm.dpm.ps[i].ps_priv = ps; adev->pm.dpm.ps[i].ps_priv = ps;
si_parse_pplib_non_clock_info(adev, &adev->pm.dpm.ps[i], si_parse_pplib_non_clock_info(adev, &adev->pm.dpm.ps[i],
non_clock_info, non_clock_info,
@ -7270,8 +7268,8 @@ static int si_parse_power_table(struct amdgpu_device *adev)
k++; k++;
} }
power_state_offset += 2 + power_state->v2.ucNumDPMLevels; power_state_offset += 2 + power_state->v2.ucNumDPMLevels;
adev->pm.dpm.num_ps++;
} }
adev->pm.dpm.num_ps = state_array->ucNumEntries;
/* fill in the vce power states */ /* fill in the vce power states */
for (i = 0; i < adev->pm.dpm.num_of_vce_states; i++) { for (i = 0; i < adev->pm.dpm.num_of_vce_states; i++) {

View File

@ -1279,8 +1279,19 @@ static ssize_t analogix_dpaux_transfer(struct drm_dp_aux *aux,
struct drm_dp_aux_msg *msg) struct drm_dp_aux_msg *msg)
{ {
struct analogix_dp_device *dp = to_dp(aux); struct analogix_dp_device *dp = to_dp(aux);
int ret;
return analogix_dp_transfer(dp, msg); pm_runtime_get_sync(dp->dev);
ret = analogix_dp_detect_hpd(dp);
if (ret)
goto out;
ret = analogix_dp_transfer(dp, msg);
out:
pm_runtime_put(dp->dev);
return ret;
} }
int analogix_dp_bind(struct device *dev, struct drm_device *drm_dev, int analogix_dp_bind(struct device *dev, struct drm_device *drm_dev,

View File

@ -543,14 +543,15 @@ void psb_intel_crtc_init(struct drm_device *dev, int pipe,
struct drm_crtc *psb_intel_get_crtc_from_pipe(struct drm_device *dev, int pipe) struct drm_crtc *psb_intel_get_crtc_from_pipe(struct drm_device *dev, int pipe)
{ {
struct drm_crtc *crtc = NULL; struct drm_crtc *crtc;
list_for_each_entry(crtc, &dev->mode_config.crtc_list, head) { list_for_each_entry(crtc, &dev->mode_config.crtc_list, head) {
struct gma_crtc *gma_crtc = to_gma_crtc(crtc); struct gma_crtc *gma_crtc = to_gma_crtc(crtc);
if (gma_crtc->pipe == pipe) if (gma_crtc->pipe == pipe)
break; return crtc;
} }
return crtc; return NULL;
} }
int gma_connector_clones(struct drm_device *dev, int type_mask) int gma_connector_clones(struct drm_device *dev, int type_mask)

View File

@ -72,7 +72,7 @@ static void ipu_crtc_disable_planes(struct ipu_crtc *ipu_crtc,
drm_atomic_crtc_state_for_each_plane(plane, old_crtc_state) { drm_atomic_crtc_state_for_each_plane(plane, old_crtc_state) {
if (plane == &ipu_crtc->plane[0]->base) if (plane == &ipu_crtc->plane[0]->base)
disable_full = true; disable_full = true;
if (&ipu_crtc->plane[1] && plane == &ipu_crtc->plane[1]->base) if (ipu_crtc->plane[1] && plane == &ipu_crtc->plane[1]->base)
disable_partial = true; disable_partial = true;
} }

View File

@ -91,7 +91,7 @@ static void mtk_cec_mask(struct mtk_cec *cec, unsigned int offset,
u32 tmp = readl(cec->regs + offset) & ~mask; u32 tmp = readl(cec->regs + offset) & ~mask;
tmp |= val & mask; tmp |= val & mask;
writel(val, cec->regs + offset); writel(tmp, cec->regs + offset);
} }
void mtk_cec_set_hpd_event(struct device *dev, void mtk_cec_set_hpd_event(struct device *dev,

View File

@ -1240,10 +1240,10 @@ static int dsi_cmds2buf_tx(struct msm_dsi_host *msm_host,
dsi_get_bpp(msm_host->format) / 8; dsi_get_bpp(msm_host->format) / 8;
len = dsi_cmd_dma_add(msm_host, msg); len = dsi_cmd_dma_add(msm_host, msg);
if (!len) { if (len < 0) {
pr_err("%s: failed to add cmd type = 0x%x\n", pr_err("%s: failed to add cmd type = 0x%x\n",
__func__, msg->type); __func__, msg->type);
return -EINVAL; return len;
} }
/* for video mode, do not send cmds more than /* for video mode, do not send cmds more than
@ -1262,10 +1262,14 @@ static int dsi_cmds2buf_tx(struct msm_dsi_host *msm_host,
} }
ret = dsi_cmd_dma_tx(msm_host, len); ret = dsi_cmd_dma_tx(msm_host, len);
if (ret < len) { if (ret < 0) {
pr_err("%s: cmd dma tx failed, type=0x%x, data0=0x%x, len=%d\n", pr_err("%s: cmd dma tx failed, type=0x%x, data0=0x%x, len=%d, ret=%d\n",
__func__, msg->type, (*(u8 *)(msg->tx_buf)), len); __func__, msg->type, (*(u8 *)(msg->tx_buf)), len, ret);
return -ECOMM; return ret;
} else if (ret < len) {
pr_err("%s: cmd dma tx failed, type=0x%x, data0=0x%x, ret=%d len=%d\n",
__func__, msg->type, (*(u8 *)(msg->tx_buf)), ret, len);
return -EIO;
} }
return len; return len;
@ -1988,9 +1992,12 @@ int msm_dsi_host_cmd_rx(struct mipi_dsi_host *host,
} }
ret = dsi_cmds2buf_tx(msm_host, msg); ret = dsi_cmds2buf_tx(msm_host, msg);
if (ret < msg->tx_len) { if (ret < 0) {
pr_err("%s: Read cmd Tx failed, %d\n", __func__, ret); pr_err("%s: Read cmd Tx failed, %d\n", __func__, ret);
return ret; return ret;
} else if (ret < msg->tx_len) {
pr_err("%s: Read cmd Tx failed, too short: %d\n", __func__, ret);
return -ECOMM;
} }
/* /*

View File

@ -148,6 +148,10 @@ static struct hdmi *msm_hdmi_init(struct platform_device *pdev)
/* HDCP needs physical address of hdmi register */ /* HDCP needs physical address of hdmi register */
res = platform_get_resource_byname(pdev, IORESOURCE_MEM, res = platform_get_resource_byname(pdev, IORESOURCE_MEM,
config->mmio_name); config->mmio_name);
if (!res) {
ret = -EINVAL;
goto fail;
}
hdmi->mmio_phy_addr = res->start; hdmi->mmio_phy_addr = res->start;
hdmi->qfprom_mmio = msm_ioremap(pdev, hdmi->qfprom_mmio = msm_ioremap(pdev,

View File

@ -26,7 +26,7 @@ struct sg_table *msm_gem_prime_get_sg_table(struct drm_gem_object *obj)
int npages = obj->size >> PAGE_SHIFT; int npages = obj->size >> PAGE_SHIFT;
if (WARN_ON(!msm_obj->pages)) /* should have already pinned! */ if (WARN_ON(!msm_obj->pages)) /* should have already pinned! */
return NULL; return ERR_PTR(-ENOMEM);
return drm_prime_pages_to_sg(msm_obj->pages, npages); return drm_prime_pages_to_sg(msm_obj->pages, npages);
} }

View File

@ -136,10 +136,10 @@ nvkm_cstate_find_best(struct nvkm_clk *clk, struct nvkm_pstate *pstate,
for (cstate = start; &cstate->head != &pstate->list; for (cstate = start; &cstate->head != &pstate->list;
cstate = list_entry(cstate->head.prev, typeof(*cstate), head)) { cstate = list_entry(cstate->head.prev, typeof(*cstate), head)) {
if (nvkm_cstate_valid(clk, cstate, max_volt, clk->temp)) if (nvkm_cstate_valid(clk, cstate, max_volt, clk->temp))
break; return cstate;
} }
return cstate; return NULL;
} }
static struct nvkm_cstate * static struct nvkm_cstate *
@ -170,6 +170,8 @@ nvkm_cstate_prog(struct nvkm_clk *clk, struct nvkm_pstate *pstate, int cstatei)
if (!list_empty(&pstate->list)) { if (!list_empty(&pstate->list)) {
cstate = nvkm_cstate_get(clk, pstate, cstatei); cstate = nvkm_cstate_get(clk, pstate, cstatei);
cstate = nvkm_cstate_find_best(clk, pstate, cstate); cstate = nvkm_cstate_find_best(clk, pstate, cstate);
if (!cstate)
return -EINVAL;
} else { } else {
cstate = &pstate->base; cstate = &pstate->base;
} }

View File

@ -489,6 +489,8 @@ static struct drm_display_mode *radeon_fp_native_mode(struct drm_encoder *encode
native_mode->vdisplay != 0 && native_mode->vdisplay != 0 &&
native_mode->clock != 0) { native_mode->clock != 0) {
mode = drm_mode_duplicate(dev, native_mode); mode = drm_mode_duplicate(dev, native_mode);
if (!mode)
return NULL;
mode->type = DRM_MODE_TYPE_PREFERRED | DRM_MODE_TYPE_DRIVER; mode->type = DRM_MODE_TYPE_PREFERRED | DRM_MODE_TYPE_DRIVER;
drm_mode_set_name(mode); drm_mode_set_name(mode);
@ -503,6 +505,8 @@ static struct drm_display_mode *radeon_fp_native_mode(struct drm_encoder *encode
* simpler. * simpler.
*/ */
mode = drm_cvt_mode(dev, native_mode->hdisplay, native_mode->vdisplay, 60, true, false, false); mode = drm_cvt_mode(dev, native_mode->hdisplay, native_mode->vdisplay, 60, true, false, false);
if (!mode)
return NULL;
mode->type = DRM_MODE_TYPE_PREFERRED | DRM_MODE_TYPE_DRIVER; mode->type = DRM_MODE_TYPE_PREFERRED | DRM_MODE_TYPE_DRIVER;
DRM_DEBUG_KMS("Adding cvt approximation of native panel mode %s\n", mode->name); DRM_DEBUG_KMS("Adding cvt approximation of native panel mode %s\n", mode->name);
} }

View File

@ -1551,10 +1551,10 @@ static int vop_bind(struct device *dev, struct device *master, void *data)
vop_win_init(vop); vop_win_init(vop);
res = platform_get_resource(pdev, IORESOURCE_MEM, 0); res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
vop->len = resource_size(res);
vop->regs = devm_ioremap_resource(dev, res); vop->regs = devm_ioremap_resource(dev, res);
if (IS_ERR(vop->regs)) if (IS_ERR(vop->regs))
return PTR_ERR(vop->regs); return PTR_ERR(vop->regs);
vop->len = resource_size(res);
vop->regsbak = devm_kzalloc(dev, vop->len, GFP_KERNEL); vop->regsbak = devm_kzalloc(dev, vop->len, GFP_KERNEL);
if (!vop->regsbak) if (!vop->regsbak)

View File

@ -187,6 +187,8 @@ static int virtio_gpu_conn_get_modes(struct drm_connector *connector)
DRM_DEBUG("add mode: %dx%d\n", width, height); DRM_DEBUG("add mode: %dx%d\n", width, height);
mode = drm_cvt_mode(connector->dev, width, height, 60, mode = drm_cvt_mode(connector->dev, width, height, 60,
false, false, false); false, false, false);
if (!mode)
return count;
mode->type |= DRM_MODE_TYPE_PREFERRED; mode->type |= DRM_MODE_TYPE_PREFERRED;
drm_mode_probed_add(connector, mode); drm_mode_probed_add(connector, mode);
count++; count++;

View File

@ -369,7 +369,7 @@ static const struct hidled_config hidled_configs[] = {
.type = DREAM_CHEEKY, .type = DREAM_CHEEKY,
.name = "Dream Cheeky Webmail Notifier", .name = "Dream Cheeky Webmail Notifier",
.short_name = "dream_cheeky", .short_name = "dream_cheeky",
.max_brightness = 31, .max_brightness = 63,
.num_leds = 1, .num_leds = 1,
.report_size = 9, .report_size = 9,
.report_type = RAW_REQUEST, .report_type = RAW_REQUEST,

View File

@ -391,9 +391,10 @@ static int debug_notifier_call(struct notifier_block *self,
int cpu; int cpu;
struct debug_drvdata *drvdata; struct debug_drvdata *drvdata;
mutex_lock(&debug_lock); /* Bail out if we can't acquire the mutex or the functionality is off */
if (!mutex_trylock(&debug_lock))
return NOTIFY_DONE;
/* Bail out if the functionality is disabled */
if (!debug_enable) if (!debug_enable)
goto skip_dump; goto skip_dump;
@ -412,7 +413,7 @@ static int debug_notifier_call(struct notifier_block *self,
skip_dump: skip_dump:
mutex_unlock(&debug_lock); mutex_unlock(&debug_lock);
return 0; return NOTIFY_DONE;
} }
static struct notifier_block debug_notifier = { static struct notifier_block debug_notifier = {

View File

@ -511,7 +511,7 @@ static void cdns_i2c_master_reset(struct i2c_adapter *adap)
static int cdns_i2c_process_msg(struct cdns_i2c *id, struct i2c_msg *msg, static int cdns_i2c_process_msg(struct cdns_i2c *id, struct i2c_msg *msg,
struct i2c_adapter *adap) struct i2c_adapter *adap)
{ {
unsigned long time_left; unsigned long time_left, msg_timeout;
u32 reg; u32 reg;
id->p_msg = msg; id->p_msg = msg;
@ -536,8 +536,16 @@ static int cdns_i2c_process_msg(struct cdns_i2c *id, struct i2c_msg *msg,
else else
cdns_i2c_msend(id); cdns_i2c_msend(id);
/* Minimal time to execute this message */
msg_timeout = msecs_to_jiffies((1000 * msg->len * BITS_PER_BYTE) / id->i2c_clk);
/* Plus some wiggle room */
msg_timeout += msecs_to_jiffies(500);
if (msg_timeout < adap->timeout)
msg_timeout = adap->timeout;
/* Wait for the signal of completion */ /* Wait for the signal of completion */
time_left = wait_for_completion_timeout(&id->xfer_done, adap->timeout); time_left = wait_for_completion_timeout(&id->xfer_done, msg_timeout);
if (time_left == 0) { if (time_left == 0) {
cdns_i2c_master_reset(adap); cdns_i2c_master_reset(adap);
dev_err(id->adap.dev.parent, dev_err(id->adap.dev.parent,

View File

@ -572,10 +572,9 @@ static struct iio_sw_device *iio_dummy_probe(const char *name)
struct iio_sw_device *swd; struct iio_sw_device *swd;
swd = kzalloc(sizeof(*swd), GFP_KERNEL); swd = kzalloc(sizeof(*swd), GFP_KERNEL);
if (!swd) { if (!swd)
ret = -ENOMEM; return ERR_PTR(-ENOMEM);
goto error_kzalloc;
}
/* /*
* Allocate an IIO device. * Allocate an IIO device.
* *
@ -587,7 +586,7 @@ static struct iio_sw_device *iio_dummy_probe(const char *name)
indio_dev = iio_device_alloc(sizeof(*st)); indio_dev = iio_device_alloc(sizeof(*st));
if (!indio_dev) { if (!indio_dev) {
ret = -ENOMEM; ret = -ENOMEM;
goto error_ret; goto error_free_swd;
} }
st = iio_priv(indio_dev); st = iio_priv(indio_dev);
@ -618,6 +617,10 @@ static struct iio_sw_device *iio_dummy_probe(const char *name)
* indio_dev->name = spi_get_device_id(spi)->name; * indio_dev->name = spi_get_device_id(spi)->name;
*/ */
indio_dev->name = kstrdup(name, GFP_KERNEL); indio_dev->name = kstrdup(name, GFP_KERNEL);
if (!indio_dev->name) {
ret = -ENOMEM;
goto error_free_device;
}
/* Provide description of available channels */ /* Provide description of available channels */
indio_dev->channels = iio_dummy_channels; indio_dev->channels = iio_dummy_channels;
@ -634,7 +637,7 @@ static struct iio_sw_device *iio_dummy_probe(const char *name)
ret = iio_simple_dummy_events_register(indio_dev); ret = iio_simple_dummy_events_register(indio_dev);
if (ret < 0) if (ret < 0)
goto error_free_device; goto error_free_name;
ret = iio_simple_dummy_configure_buffer(indio_dev); ret = iio_simple_dummy_configure_buffer(indio_dev);
if (ret < 0) if (ret < 0)
@ -651,11 +654,12 @@ error_unconfigure_buffer:
iio_simple_dummy_unconfigure_buffer(indio_dev); iio_simple_dummy_unconfigure_buffer(indio_dev);
error_unregister_events: error_unregister_events:
iio_simple_dummy_events_unregister(indio_dev); iio_simple_dummy_events_unregister(indio_dev);
error_free_name:
kfree(indio_dev->name);
error_free_device: error_free_device:
iio_device_free(indio_dev); iio_device_free(indio_dev);
error_ret: error_free_swd:
kfree(swd); kfree(swd);
error_kzalloc:
return ERR_PTR(ret); return ERR_PTR(ret);
} }

View File

@ -424,6 +424,8 @@ static ssize_t hfi1_write_iter(struct kiocb *kiocb, struct iov_iter *from)
unsigned long dim = from->nr_segs; unsigned long dim = from->nr_segs;
int idx; int idx;
if (!HFI1_CAP_IS_KSET(SDMA))
return -EINVAL;
idx = srcu_read_lock(&fd->pq_srcu); idx = srcu_read_lock(&fd->pq_srcu);
pq = srcu_dereference(fd->pq, &fd->pq_srcu); pq = srcu_dereference(fd->pq, &fd->pq_srcu);
if (!cq || !pq) { if (!cq || !pq) {

View File

@ -515,7 +515,7 @@ void set_link_ipg(struct hfi1_pportdata *ppd)
u16 shift, mult; u16 shift, mult;
u64 src; u64 src;
u32 current_egress_rate; /* Mbits /sec */ u32 current_egress_rate; /* Mbits /sec */
u32 max_pkt_time; u64 max_pkt_time;
/* /*
* max_pkt_time is the maximum packet egress time in units * max_pkt_time is the maximum packet egress time in units
* of the fabric clock period 1/(805 MHz). * of the fabric clock period 1/(805 MHz).

View File

@ -680,7 +680,7 @@ next_wqe:
opcode = next_opcode(qp, wqe, wqe->wr.opcode); opcode = next_opcode(qp, wqe, wqe->wr.opcode);
if (unlikely(opcode < 0)) { if (unlikely(opcode < 0)) {
wqe->status = IB_WC_LOC_QP_OP_ERR; wqe->status = IB_WC_LOC_QP_OP_ERR;
goto exit; goto err;
} }
mask = rxe_opcode[opcode].mask; mask = rxe_opcode[opcode].mask;

View File

@ -204,6 +204,7 @@ static int bbc_beep_probe(struct platform_device *op)
info = &state->u.bbc; info = &state->u.bbc;
info->clock_freq = of_getintprop_default(dp, "clock-frequency", 0); info->clock_freq = of_getintprop_default(dp, "clock-frequency", 0);
of_node_put(dp);
if (!info->clock_freq) if (!info->clock_freq)
goto out_free; goto out_free;

View File

@ -956,17 +956,22 @@ static int bcm5974_probe(struct usb_interface *iface,
if (!dev->tp_data) if (!dev->tp_data)
goto err_free_bt_buffer; goto err_free_bt_buffer;
if (dev->bt_urb) if (dev->bt_urb) {
usb_fill_int_urb(dev->bt_urb, udev, usb_fill_int_urb(dev->bt_urb, udev,
usb_rcvintpipe(udev, cfg->bt_ep), usb_rcvintpipe(udev, cfg->bt_ep),
dev->bt_data, dev->cfg.bt_datalen, dev->bt_data, dev->cfg.bt_datalen,
bcm5974_irq_button, dev, 1); bcm5974_irq_button, dev, 1);
dev->bt_urb->transfer_flags |= URB_NO_TRANSFER_DMA_MAP;
}
usb_fill_int_urb(dev->tp_urb, udev, usb_fill_int_urb(dev->tp_urb, udev,
usb_rcvintpipe(udev, cfg->tp_ep), usb_rcvintpipe(udev, cfg->tp_ep),
dev->tp_data, dev->cfg.tp_datalen, dev->tp_data, dev->cfg.tp_datalen,
bcm5974_irq_trackpad, dev, 1); bcm5974_irq_trackpad, dev, 1);
dev->tp_urb->transfer_flags |= URB_NO_TRANSFER_DMA_MAP;
/* create bcm5974 device */ /* create bcm5974 device */
usb_make_path(udev, dev->phys, sizeof(dev->phys)); usb_make_path(udev, dev->phys, sizeof(dev->phys));
strlcat(dev->phys, "/input0", sizeof(dev->phys)); strlcat(dev->phys, "/input0", sizeof(dev->phys));

View File

@ -89,7 +89,7 @@
#define ACPI_DEVFLAG_LINT1 0x80 #define ACPI_DEVFLAG_LINT1 0x80
#define ACPI_DEVFLAG_ATSDIS 0x10000000 #define ACPI_DEVFLAG_ATSDIS 0x10000000
#define LOOP_TIMEOUT 100000 #define LOOP_TIMEOUT 2000000
/* /*
* ACPI table definitions * ACPI table definitions
* *

View File

@ -638,16 +638,19 @@ static void insert_iommu_master(struct device *dev,
static int qcom_iommu_of_xlate(struct device *dev, static int qcom_iommu_of_xlate(struct device *dev,
struct of_phandle_args *spec) struct of_phandle_args *spec)
{ {
struct msm_iommu_dev *iommu; struct msm_iommu_dev *iommu = NULL, *iter;
unsigned long flags; unsigned long flags;
int ret = 0; int ret = 0;
spin_lock_irqsave(&msm_iommu_lock, flags); spin_lock_irqsave(&msm_iommu_lock, flags);
list_for_each_entry(iommu, &qcom_iommu_devices, dev_node) list_for_each_entry(iter, &qcom_iommu_devices, dev_node) {
if (iommu->dev->of_node == spec->np) if (iter->dev->of_node == spec->np) {
iommu = iter;
break; break;
}
}
if (!iommu || iommu->dev->of_node != spec->np) { if (!iommu) {
ret = -ENODEV; ret = -ENODEV;
goto fail; goto fail;
} }

View File

@ -696,8 +696,7 @@ static int mtk_iommu_remove(struct platform_device *pdev)
iommu_device_sysfs_remove(&data->iommu); iommu_device_sysfs_remove(&data->iommu);
iommu_device_unregister(&data->iommu); iommu_device_unregister(&data->iommu);
if (iommu_present(&platform_bus_type)) list_del(&data->list);
bus_set_iommu(&platform_bus_type, NULL);
clk_disable_unprepare(data->bclk); clk_disable_unprepare(data->bclk);
devm_free_irq(&pdev->dev, data->irq, data); devm_free_irq(&pdev->dev, data->irq, data);

View File

@ -392,7 +392,16 @@ static void armada_xp_mpic_smp_cpu_init(void)
static void armada_xp_mpic_perf_init(void) static void armada_xp_mpic_perf_init(void)
{ {
unsigned long cpuid = cpu_logical_map(smp_processor_id()); unsigned long cpuid;
/*
* This Performance Counter Overflow interrupt is specific for
* Armada 370 and XP. It is not available on Armada 375, 38x and 39x.
*/
if (!of_machine_is_compatible("marvell,armada-370-xp"))
return;
cpuid = cpu_logical_map(smp_processor_id());
/* Enable Performance Counter Overflow interrupts */ /* Enable Performance Counter Overflow interrupts */
writel(ARMADA_370_XP_INT_CAUSE_PERF(cpuid), writel(ARMADA_370_XP_INT_CAUSE_PERF(cpuid),

View File

@ -82,8 +82,8 @@ static int __init aspeed_i2c_ic_of_init(struct device_node *node,
} }
i2c_ic->parent_irq = irq_of_parse_and_map(node, 0); i2c_ic->parent_irq = irq_of_parse_and_map(node, 0);
if (i2c_ic->parent_irq < 0) { if (!i2c_ic->parent_irq) {
ret = i2c_ic->parent_irq; ret = -EINVAL;
goto err_iounmap; goto err_iounmap;
} }

View File

@ -143,14 +143,25 @@ static struct irq_chip xtensa_mx_irq_chip = {
.irq_set_affinity = xtensa_mx_irq_set_affinity, .irq_set_affinity = xtensa_mx_irq_set_affinity,
}; };
static void __init xtensa_mx_init_common(struct irq_domain *root_domain)
{
unsigned int i;
irq_set_default_host(root_domain);
secondary_init_irq();
/* Initialize default IRQ routing to CPU 0 */
for (i = 0; i < XCHAL_NUM_EXTINTERRUPTS; ++i)
set_er(1, MIROUT(i));
}
int __init xtensa_mx_init_legacy(struct device_node *interrupt_parent) int __init xtensa_mx_init_legacy(struct device_node *interrupt_parent)
{ {
struct irq_domain *root_domain = struct irq_domain *root_domain =
irq_domain_add_legacy(NULL, NR_IRQS - 1, 1, 0, irq_domain_add_legacy(NULL, NR_IRQS - 1, 1, 0,
&xtensa_mx_irq_domain_ops, &xtensa_mx_irq_domain_ops,
&xtensa_mx_irq_chip); &xtensa_mx_irq_chip);
irq_set_default_host(root_domain); xtensa_mx_init_common(root_domain);
secondary_init_irq();
return 0; return 0;
} }
@ -160,8 +171,7 @@ static int __init xtensa_mx_init(struct device_node *np,
struct irq_domain *root_domain = struct irq_domain *root_domain =
irq_domain_add_linear(np, NR_IRQS, &xtensa_mx_irq_domain_ops, irq_domain_add_linear(np, NR_IRQS, &xtensa_mx_irq_domain_ops,
&xtensa_mx_irq_chip); &xtensa_mx_irq_chip);
irq_set_default_host(root_domain); xtensa_mx_init_common(root_domain);
secondary_init_irq();
return 0; return 0;
} }
IRQCHIP_DECLARE(xtensa_mx_irq_chip, "cdns,xtensa-mx", xtensa_mx_init); IRQCHIP_DECLARE(xtensa_mx_irq_chip, "cdns,xtensa-mx", xtensa_mx_init);

View File

@ -77,6 +77,10 @@ config ADB_PMU
this device; you should do so if your machine is one of those this device; you should do so if your machine is one of those
mentioned above. mentioned above.
config ADB_PMU_EVENT
def_bool y
depends on ADB_PMU && INPUT=y
config ADB_PMU_LED config ADB_PMU_LED
bool "Support for the Power/iBook front LED" bool "Support for the Power/iBook front LED"
depends on ADB_PMU depends on ADB_PMU

View File

@ -12,7 +12,8 @@ obj-$(CONFIG_MAC_EMUMOUSEBTN) += mac_hid.o
obj-$(CONFIG_INPUT_ADBHID) += adbhid.o obj-$(CONFIG_INPUT_ADBHID) += adbhid.o
obj-$(CONFIG_ANSLCD) += ans-lcd.o obj-$(CONFIG_ANSLCD) += ans-lcd.o
obj-$(CONFIG_ADB_PMU) += via-pmu.o via-pmu-event.o obj-$(CONFIG_ADB_PMU) += via-pmu.o
obj-$(CONFIG_ADB_PMU_EVENT) += via-pmu-event.o
obj-$(CONFIG_ADB_PMU_LED) += via-pmu-led.o obj-$(CONFIG_ADB_PMU_LED) += via-pmu-led.o
obj-$(CONFIG_PMAC_BACKLIGHT) += via-pmu-backlight.o obj-$(CONFIG_PMAC_BACKLIGHT) += via-pmu-backlight.o
obj-$(CONFIG_ADB_CUDA) += via-cuda.o obj-$(CONFIG_ADB_CUDA) += via-cuda.o

View File

@ -1440,7 +1440,7 @@ next:
pmu_pass_intr(data, len); pmu_pass_intr(data, len);
/* len == 6 is probably a bad check. But how do I /* len == 6 is probably a bad check. But how do I
* know what PMU versions send what events here? */ * know what PMU versions send what events here? */
if (len == 6) { if (IS_ENABLED(CONFIG_ADB_PMU_EVENT) && len == 6) {
via_pmu_event(PMU_EVT_POWER, !!(data[1]&8)); via_pmu_event(PMU_EVT_POWER, !!(data[1]&8));
via_pmu_event(PMU_EVT_LID, data[1]&1); via_pmu_event(PMU_EVT_LID, data[1]&1);
} }

View File

@ -85,11 +85,11 @@ static void msg_submit(struct mbox_chan *chan)
exit: exit:
spin_unlock_irqrestore(&chan->lock, flags); spin_unlock_irqrestore(&chan->lock, flags);
/* kick start the timer immediately to avoid delays */
if (!err && (chan->txdone_method & TXDONE_BY_POLL)) { if (!err && (chan->txdone_method & TXDONE_BY_POLL)) {
/* but only if not already active */ /* kick start the timer immediately to avoid delays */
if (!hrtimer_active(&chan->mbox->poll_hrt)) spin_lock_irqsave(&chan->mbox->poll_hrt_lock, flags);
hrtimer_start(&chan->mbox->poll_hrt, 0, HRTIMER_MODE_REL); hrtimer_start(&chan->mbox->poll_hrt, 0, HRTIMER_MODE_REL);
spin_unlock_irqrestore(&chan->mbox->poll_hrt_lock, flags);
} }
} }
@ -123,20 +123,26 @@ static enum hrtimer_restart txdone_hrtimer(struct hrtimer *hrtimer)
container_of(hrtimer, struct mbox_controller, poll_hrt); container_of(hrtimer, struct mbox_controller, poll_hrt);
bool txdone, resched = false; bool txdone, resched = false;
int i; int i;
unsigned long flags;
for (i = 0; i < mbox->num_chans; i++) { for (i = 0; i < mbox->num_chans; i++) {
struct mbox_chan *chan = &mbox->chans[i]; struct mbox_chan *chan = &mbox->chans[i];
if (chan->active_req && chan->cl) { if (chan->active_req && chan->cl) {
resched = true;
txdone = chan->mbox->ops->last_tx_done(chan); txdone = chan->mbox->ops->last_tx_done(chan);
if (txdone) if (txdone)
tx_tick(chan, 0); tx_tick(chan, 0);
else
resched = true;
} }
} }
if (resched) { if (resched) {
hrtimer_forward_now(hrtimer, ms_to_ktime(mbox->txpoll_period)); spin_lock_irqsave(&mbox->poll_hrt_lock, flags);
if (!hrtimer_is_queued(hrtimer))
hrtimer_forward_now(hrtimer, ms_to_ktime(mbox->txpoll_period));
spin_unlock_irqrestore(&mbox->poll_hrt_lock, flags);
return HRTIMER_RESTART; return HRTIMER_RESTART;
} }
return HRTIMER_NORESTART; return HRTIMER_NORESTART;
@ -473,6 +479,7 @@ int mbox_controller_register(struct mbox_controller *mbox)
hrtimer_init(&mbox->poll_hrt, CLOCK_MONOTONIC, hrtimer_init(&mbox->poll_hrt, CLOCK_MONOTONIC,
HRTIMER_MODE_REL); HRTIMER_MODE_REL);
mbox->poll_hrt.function = txdone_hrtimer; mbox->poll_hrt.function = txdone_hrtimer;
spin_lock_init(&mbox->poll_hrt_lock);
} }
for (i = 0; i < mbox->num_chans; i++) { for (i = 0; i < mbox->num_chans; i++) {

View File

@ -2427,14 +2427,16 @@ static void sync_sbs(struct mddev *mddev, int nospares)
static bool does_sb_need_changing(struct mddev *mddev) static bool does_sb_need_changing(struct mddev *mddev)
{ {
struct md_rdev *rdev; struct md_rdev *rdev = NULL, *iter;
struct mdp_superblock_1 *sb; struct mdp_superblock_1 *sb;
int role; int role;
/* Find a good rdev */ /* Find a good rdev */
rdev_for_each(rdev, mddev) rdev_for_each(iter, mddev)
if ((rdev->raid_disk >= 0) && !test_bit(Faulty, &rdev->flags)) if ((iter->raid_disk >= 0) && !test_bit(Faulty, &iter->flags)) {
rdev = iter;
break; break;
}
/* No good device found. */ /* No good device found. */
if (!rdev) if (!rdev)
@ -7588,17 +7590,22 @@ EXPORT_SYMBOL(md_register_thread);
void md_unregister_thread(struct md_thread **threadp) void md_unregister_thread(struct md_thread **threadp)
{ {
struct md_thread *thread = *threadp; struct md_thread *thread;
if (!thread)
return; /*
pr_debug("interrupting MD-thread pid %d\n", task_pid_nr(thread->tsk)); * Locking ensures that mddev_unlock does not wake_up a
/* Locking ensures that mddev_unlock does not wake_up a
* non-existent thread * non-existent thread
*/ */
spin_lock(&pers_lock); spin_lock(&pers_lock);
thread = *threadp;
if (!thread) {
spin_unlock(&pers_lock);
return;
}
*threadp = NULL; *threadp = NULL;
spin_unlock(&pers_lock); spin_unlock(&pers_lock);
pr_debug("interrupting MD-thread pid %d\n", task_pid_nr(thread->tsk));
kthread_stop(thread->tsk); kthread_stop(thread->tsk);
kfree(thread); kfree(thread);
} }
@ -9264,16 +9271,18 @@ static int read_rdev(struct mddev *mddev, struct md_rdev *rdev)
void md_reload_sb(struct mddev *mddev, int nr) void md_reload_sb(struct mddev *mddev, int nr)
{ {
struct md_rdev *rdev; struct md_rdev *rdev = NULL, *iter;
int err; int err;
/* Find the rdev */ /* Find the rdev */
rdev_for_each_rcu(rdev, mddev) { rdev_for_each_rcu(iter, mddev) {
if (rdev->desc_nr == nr) if (iter->desc_nr == nr) {
rdev = iter;
break; break;
}
} }
if (!rdev || rdev->desc_nr != nr) { if (!rdev) {
pr_warn("%s: %d Could not find rdev with nr %d\n", __func__, __LINE__, nr); pr_warn("%s: %d Could not find rdev with nr %d\n", __func__, __LINE__, nr);
return; return;
} }

View File

@ -150,21 +150,6 @@ static int create_strip_zones(struct mddev *mddev, struct r0conf **private_conf)
pr_debug("md/raid0:%s: FINAL %d zones\n", pr_debug("md/raid0:%s: FINAL %d zones\n",
mdname(mddev), conf->nr_strip_zones); mdname(mddev), conf->nr_strip_zones);
if (conf->nr_strip_zones == 1) {
conf->layout = RAID0_ORIG_LAYOUT;
} else if (mddev->layout == RAID0_ORIG_LAYOUT ||
mddev->layout == RAID0_ALT_MULTIZONE_LAYOUT) {
conf->layout = mddev->layout;
} else if (default_layout == RAID0_ORIG_LAYOUT ||
default_layout == RAID0_ALT_MULTIZONE_LAYOUT) {
conf->layout = default_layout;
} else {
pr_err("md/raid0:%s: cannot assemble multi-zone RAID0 with default_layout setting\n",
mdname(mddev));
pr_err("md/raid0: please set raid0.default_layout to 1 or 2\n");
err = -ENOTSUPP;
goto abort;
}
/* /*
* now since we have the hard sector sizes, we can make sure * now since we have the hard sector sizes, we can make sure
* chunk size is a multiple of that sector size * chunk size is a multiple of that sector size
@ -293,6 +278,22 @@ static int create_strip_zones(struct mddev *mddev, struct r0conf **private_conf)
(unsigned long long)smallest->sectors); (unsigned long long)smallest->sectors);
} }
if (conf->nr_strip_zones == 1 || conf->strip_zone[1].nb_dev == 1) {
conf->layout = RAID0_ORIG_LAYOUT;
} else if (mddev->layout == RAID0_ORIG_LAYOUT ||
mddev->layout == RAID0_ALT_MULTIZONE_LAYOUT) {
conf->layout = mddev->layout;
} else if (default_layout == RAID0_ORIG_LAYOUT ||
default_layout == RAID0_ALT_MULTIZONE_LAYOUT) {
conf->layout = default_layout;
} else {
pr_err("md/raid0:%s: cannot assemble multi-zone RAID0 with default_layout setting\n",
mdname(mddev));
pr_err("md/raid0: please set raid0.default_layout to 1 or 2\n");
err = -EOPNOTSUPP;
goto abort;
}
pr_debug("md/raid0:%s: done.\n", mdname(mddev)); pr_debug("md/raid0:%s: done.\n", mdname(mddev));
*private_conf = conf; *private_conf = conf;

View File

@ -2005,7 +2005,7 @@ static int cx23885_initdev(struct pci_dev *pci_dev,
err = pci_set_dma_mask(pci_dev, 0xffffffff); err = pci_set_dma_mask(pci_dev, 0xffffffff);
if (err) { if (err) {
pr_err("%s/0: Oops: no 32bit PCI DMA ???\n", dev->name); pr_err("%s/0: Oops: no 32bit PCI DMA ???\n", dev->name);
goto fail_ctrl; goto fail_dma_set_mask;
} }
err = request_irq(pci_dev->irq, cx23885_irq, err = request_irq(pci_dev->irq, cx23885_irq,
@ -2013,7 +2013,7 @@ static int cx23885_initdev(struct pci_dev *pci_dev,
if (err < 0) { if (err < 0) {
pr_err("%s: can't get IRQ %d\n", pr_err("%s: can't get IRQ %d\n",
dev->name, pci_dev->irq); dev->name, pci_dev->irq);
goto fail_irq; goto fail_dma_set_mask;
} }
switch (dev->board) { switch (dev->board) {
@ -2035,7 +2035,7 @@ static int cx23885_initdev(struct pci_dev *pci_dev,
return 0; return 0;
fail_irq: fail_dma_set_mask:
cx23885_dev_unregister(dev); cx23885_dev_unregister(dev);
fail_ctrl: fail_ctrl:
v4l2_ctrl_handler_free(hdl); v4l2_ctrl_handler_free(hdl);

View File

@ -1350,11 +1350,11 @@ static void cx25821_finidev(struct pci_dev *pci_dev)
struct cx25821_dev *dev = get_cx25821(v4l2_dev); struct cx25821_dev *dev = get_cx25821(v4l2_dev);
cx25821_shutdown(dev); cx25821_shutdown(dev);
pci_disable_device(pci_dev);
/* unregister stuff */ /* unregister stuff */
if (pci_dev->irq) if (pci_dev->irq)
free_irq(pci_dev->irq, dev); free_irq(pci_dev->irq, dev);
pci_disable_device(pci_dev);
cx25821_dev_unregister(dev); cx25821_dev_unregister(dev);
v4l2_device_unregister(v4l2_dev); v4l2_device_unregister(v4l2_dev);

View File

@ -144,7 +144,7 @@ static int fimc_is_enable_clocks(struct fimc_is *is)
dev_err(&is->pdev->dev, "clock %s enable failed\n", dev_err(&is->pdev->dev, "clock %s enable failed\n",
fimc_is_clocks[i]); fimc_is_clocks[i]);
for (--i; i >= 0; i--) for (--i; i >= 0; i--)
clk_disable(is->clocks[i]); clk_disable_unprepare(is->clocks[i]);
return ret; return ret;
} }
pr_debug("enabled clock: %s\n", fimc_is_clocks[i]); pr_debug("enabled clock: %s\n", fimc_is_clocks[i]);

View File

@ -35,7 +35,7 @@ static inline int fimc_isp_video_device_register(struct fimc_isp *isp,
return 0; return 0;
} }
void fimc_isp_video_device_unregister(struct fimc_isp *isp, static inline void fimc_isp_video_device_unregister(struct fimc_isp *isp,
enum v4l2_buf_type type) enum v4l2_buf_type type)
{ {
} }

View File

@ -117,6 +117,9 @@ int hfi_core_deinit(struct venus_core *core, bool blocking)
mutex_lock(&core->lock); mutex_lock(&core->lock);
} }
if (!core->ops)
goto unlock;
ret = core->ops->core_deinit(core); ret = core->ops->core_deinit(core);
if (!ret) if (!ret)

View File

@ -1880,7 +1880,7 @@ static int delta_probe(struct platform_device *pdev)
if (ret) { if (ret) {
dev_err(delta->dev, "%s failed to initialize firmware ipc channel\n", dev_err(delta->dev, "%s failed to initialize firmware ipc channel\n",
DELTA_PREFIX); DELTA_PREFIX);
goto err; goto err_pm_disable;
} }
/* register all available decoders */ /* register all available decoders */
@ -1894,7 +1894,7 @@ static int delta_probe(struct platform_device *pdev)
if (ret) { if (ret) {
dev_err(delta->dev, "%s failed to register V4L2 device\n", dev_err(delta->dev, "%s failed to register V4L2 device\n",
DELTA_PREFIX); DELTA_PREFIX);
goto err; goto err_pm_disable;
} }
delta->work_queue = create_workqueue(DELTA_NAME); delta->work_queue = create_workqueue(DELTA_NAME);
@ -1919,6 +1919,8 @@ err_work_queue:
destroy_workqueue(delta->work_queue); destroy_workqueue(delta->work_queue);
err_v4l2: err_v4l2:
v4l2_device_unregister(&delta->v4l2_dev); v4l2_device_unregister(&delta->v4l2_dev);
err_pm_disable:
pm_runtime_disable(dev);
err: err:
return ret; return ret;
} }

View File

@ -2563,6 +2563,11 @@ struct pvr2_hdw *pvr2_hdw_create(struct usb_interface *intf,
} while (0); } while (0);
mutex_unlock(&pvr2_unit_mtx); mutex_unlock(&pvr2_unit_mtx);
INIT_WORK(&hdw->workpoll, pvr2_hdw_worker_poll);
if (hdw->unit_number == -1)
goto fail;
cnt1 = 0; cnt1 = 0;
cnt2 = scnprintf(hdw->name+cnt1,sizeof(hdw->name)-cnt1,"pvrusb2"); cnt2 = scnprintf(hdw->name+cnt1,sizeof(hdw->name)-cnt1,"pvrusb2");
cnt1 += cnt2; cnt1 += cnt2;
@ -2574,8 +2579,6 @@ struct pvr2_hdw *pvr2_hdw_create(struct usb_interface *intf,
if (cnt1 >= sizeof(hdw->name)) cnt1 = sizeof(hdw->name)-1; if (cnt1 >= sizeof(hdw->name)) cnt1 = sizeof(hdw->name)-1;
hdw->name[cnt1] = 0; hdw->name[cnt1] = 0;
INIT_WORK(&hdw->workpoll,pvr2_hdw_worker_poll);
pvr2_trace(PVR2_TRACE_INIT,"Driver unit number is %d, name is %s", pvr2_trace(PVR2_TRACE_INIT,"Driver unit number is %d, name is %s",
hdw->unit_number,hdw->name); hdw->unit_number,hdw->name);

View File

@ -841,29 +841,31 @@ static int uvc_ioctl_enum_input(struct file *file, void *fh,
struct uvc_video_chain *chain = handle->chain; struct uvc_video_chain *chain = handle->chain;
const struct uvc_entity *selector = chain->selector; const struct uvc_entity *selector = chain->selector;
struct uvc_entity *iterm = NULL; struct uvc_entity *iterm = NULL;
struct uvc_entity *it;
u32 index = input->index; u32 index = input->index;
int pin = 0;
if (selector == NULL || if (selector == NULL ||
(chain->dev->quirks & UVC_QUIRK_IGNORE_SELECTOR_UNIT)) { (chain->dev->quirks & UVC_QUIRK_IGNORE_SELECTOR_UNIT)) {
if (index != 0) if (index != 0)
return -EINVAL; return -EINVAL;
list_for_each_entry(iterm, &chain->entities, chain) { list_for_each_entry(it, &chain->entities, chain) {
if (UVC_ENTITY_IS_ITERM(iterm)) if (UVC_ENTITY_IS_ITERM(it)) {
iterm = it;
break; break;
}
} }
pin = iterm->id;
} else if (index < selector->bNrInPins) { } else if (index < selector->bNrInPins) {
pin = selector->baSourceID[index]; list_for_each_entry(it, &chain->entities, chain) {
list_for_each_entry(iterm, &chain->entities, chain) { if (!UVC_ENTITY_IS_ITERM(it))
if (!UVC_ENTITY_IS_ITERM(iterm))
continue; continue;
if (iterm->id == pin) if (it->id == selector->baSourceID[index]) {
iterm = it;
break; break;
}
} }
} }
if (iterm == NULL || iterm->id != pin) if (iterm == NULL)
return -EINVAL; return -EINVAL;
memset(input, 0, sizeof(*input)); memset(input, 0, sizeof(*input));

View File

@ -410,7 +410,7 @@ static int __init micro_probe(struct platform_device *pdev)
micro_reset_comm(micro); micro_reset_comm(micro);
irq = platform_get_irq(pdev, 0); irq = platform_get_irq(pdev, 0);
if (!irq) if (irq < 0)
return -EINVAL; return -EINVAL;
ret = devm_request_irq(&pdev->dev, irq, micro_serial_isr, ret = devm_request_irq(&pdev->dev, irq, micro_serial_isr,
IRQF_SHARED, "ipaq-micro", IRQF_SHARED, "ipaq-micro",

View File

@ -678,6 +678,7 @@ static int rtsx_usb_probe(struct usb_interface *intf,
return 0; return 0;
out_init_fail: out_init_fail:
usb_set_intfdata(ucr->pusb_intf, NULL);
usb_free_coherent(ucr->pusb_dev, IOBUF_SIZE, ucr->iobuf, usb_free_coherent(ucr->pusb_dev, IOBUF_SIZE, ucr->iobuf,
ucr->iobuf_dma); ucr->iobuf_dma);
return ret; return ret;

View File

@ -30,12 +30,12 @@ static const unsigned char test_text[] = "This is a test.\n";
*/ */
static noinline unsigned char *trick_compiler(unsigned char *stack) static noinline unsigned char *trick_compiler(unsigned char *stack)
{ {
return stack + 0; return stack + unconst;
} }
static noinline unsigned char *do_usercopy_stack_callee(int value) static noinline unsigned char *do_usercopy_stack_callee(int value)
{ {
unsigned char buf[32]; unsigned char buf[128];
int i; int i;
/* Exercise stack to avoid everything living in registers. */ /* Exercise stack to avoid everything living in registers. */
@ -43,7 +43,12 @@ static noinline unsigned char *do_usercopy_stack_callee(int value)
buf[i] = value & 0xff; buf[i] = value & 0xff;
} }
return trick_compiler(buf); /*
* Put the target buffer in the middle of stack allocation
* so that we don't step on future stack users regardless
* of stack growth direction.
*/
return trick_compiler(&buf[(128/2)-32]);
} }
static noinline void do_usercopy_stack(bool to_user, bool bad_frame) static noinline void do_usercopy_stack(bool to_user, bool bad_frame)
@ -66,6 +71,12 @@ static noinline void do_usercopy_stack(bool to_user, bool bad_frame)
bad_stack -= sizeof(unsigned long); bad_stack -= sizeof(unsigned long);
} }
#ifdef ARCH_HAS_CURRENT_STACK_POINTER
pr_info("stack : %px\n", (void *)current_stack_pointer);
#endif
pr_info("good_stack: %px-%px\n", good_stack, good_stack + sizeof(good_stack));
pr_info("bad_stack : %px-%px\n", bad_stack, bad_stack + sizeof(good_stack));
user_addr = vm_mmap(NULL, 0, PAGE_SIZE, user_addr = vm_mmap(NULL, 0, PAGE_SIZE,
PROT_READ | PROT_WRITE | PROT_EXEC, PROT_READ | PROT_WRITE | PROT_EXEC,
MAP_ANONYMOUS | MAP_PRIVATE, 0); MAP_ANONYMOUS | MAP_PRIVATE, 0);

View File

@ -49,6 +49,10 @@
#define SST49LF008A 0x005a #define SST49LF008A 0x005a
#define AT49BV6416 0x00d6 #define AT49BV6416 0x00d6
enum cfi_quirks {
CFI_QUIRK_DQ_TRUE_DATA = BIT(0),
};
static int cfi_amdstd_read (struct mtd_info *, loff_t, size_t, size_t *, u_char *); static int cfi_amdstd_read (struct mtd_info *, loff_t, size_t, size_t *, u_char *);
static int cfi_amdstd_write_words(struct mtd_info *, loff_t, size_t, size_t *, const u_char *); static int cfi_amdstd_write_words(struct mtd_info *, loff_t, size_t, size_t *, const u_char *);
static int cfi_amdstd_write_buffers(struct mtd_info *, loff_t, size_t, size_t *, const u_char *); static int cfi_amdstd_write_buffers(struct mtd_info *, loff_t, size_t, size_t *, const u_char *);
@ -365,6 +369,15 @@ static void fixup_s29ns512p_sectors(struct mtd_info *mtd)
mtd->name); mtd->name);
} }
static void fixup_quirks(struct mtd_info *mtd)
{
struct map_info *map = mtd->priv;
struct cfi_private *cfi = map->fldrv_priv;
if (cfi->mfr == CFI_MFR_AMD && cfi->id == 0x0c01)
cfi->quirks |= CFI_QUIRK_DQ_TRUE_DATA;
}
/* Used to fix CFI-Tables of chips without Extended Query Tables */ /* Used to fix CFI-Tables of chips without Extended Query Tables */
static struct cfi_fixup cfi_nopri_fixup_table[] = { static struct cfi_fixup cfi_nopri_fixup_table[] = {
{ CFI_MFR_SST, 0x234a, fixup_sst39vf }, /* SST39VF1602 */ { CFI_MFR_SST, 0x234a, fixup_sst39vf }, /* SST39VF1602 */
@ -403,6 +416,7 @@ static struct cfi_fixup cfi_fixup_table[] = {
#if !FORCE_WORD_WRITE #if !FORCE_WORD_WRITE
{ CFI_MFR_ANY, CFI_ID_ANY, fixup_use_write_buffers }, { CFI_MFR_ANY, CFI_ID_ANY, fixup_use_write_buffers },
#endif #endif
{ CFI_MFR_ANY, CFI_ID_ANY, fixup_quirks },
{ 0, 0, NULL } { 0, 0, NULL }
}; };
static struct cfi_fixup jedec_fixup_table[] = { static struct cfi_fixup jedec_fixup_table[] = {
@ -729,32 +743,11 @@ static struct mtd_info *cfi_amdstd_setup(struct mtd_info *mtd)
return NULL; return NULL;
} }
/*
* Return true if the chip is ready.
*
* Ready is one of: read mode, query mode, erase-suspend-read mode (in any
* non-suspended sector) and is indicated by no toggle bits toggling.
*
* Note that anything more complicated than checking if no bits are toggling
* (including checking DQ5 for an error status) is tricky to get working
* correctly and is therefore not done (particularly with interleaved chips
* as each chip must be checked independently of the others).
*/
static int __xipram chip_ready(struct map_info *map, unsigned long addr)
{
map_word d, t;
d = map_read(map, addr);
t = map_read(map, addr);
return map_word_equal(map, d, t);
}
/* /*
* Return true if the chip is ready and has the correct value. * Return true if the chip is ready and has the correct value.
* *
* Ready is one of: read mode, query mode, erase-suspend-read mode (in any * Ready is one of: read mode, query mode, erase-suspend-read mode (in any
* non-suspended sector) and it is indicated by no bits toggling. * non-suspended sector) and is indicated by no toggle bits toggling.
* *
* Error are indicated by toggling bits or bits held with the wrong value, * Error are indicated by toggling bits or bits held with the wrong value,
* or with bits toggling. * or with bits toggling.
@ -763,17 +756,34 @@ static int __xipram chip_ready(struct map_info *map, unsigned long addr)
* (including checking DQ5 for an error status) is tricky to get working * (including checking DQ5 for an error status) is tricky to get working
* correctly and is therefore not done (particularly with interleaved chips * correctly and is therefore not done (particularly with interleaved chips
* as each chip must be checked independently of the others). * as each chip must be checked independently of the others).
*
*/ */
static int __xipram chip_good(struct map_info *map, unsigned long addr, map_word expected) static int __xipram chip_ready(struct map_info *map, unsigned long addr,
map_word *expected)
{ {
map_word oldd, curd; map_word d, t;
int ret;
oldd = map_read(map, addr); d = map_read(map, addr);
curd = map_read(map, addr); t = map_read(map, addr);
return map_word_equal(map, oldd, curd) && ret = map_word_equal(map, d, t);
map_word_equal(map, curd, expected);
if (!ret || !expected)
return ret;
return map_word_equal(map, t, *expected);
}
static int __xipram chip_good(struct map_info *map, unsigned long addr,
map_word *expected)
{
struct cfi_private *cfi = map->fldrv_priv;
map_word *datum = expected;
if (cfi->quirks & CFI_QUIRK_DQ_TRUE_DATA)
datum = NULL;
return chip_ready(map, addr, datum);
} }
static int get_chip(struct map_info *map, struct flchip *chip, unsigned long adr, int mode) static int get_chip(struct map_info *map, struct flchip *chip, unsigned long adr, int mode)
@ -790,7 +800,7 @@ static int get_chip(struct map_info *map, struct flchip *chip, unsigned long adr
case FL_STATUS: case FL_STATUS:
for (;;) { for (;;) {
if (chip_ready(map, adr)) if (chip_ready(map, adr, NULL))
break; break;
if (time_after(jiffies, timeo)) { if (time_after(jiffies, timeo)) {
@ -828,7 +838,7 @@ static int get_chip(struct map_info *map, struct flchip *chip, unsigned long adr
chip->state = FL_ERASE_SUSPENDING; chip->state = FL_ERASE_SUSPENDING;
chip->erase_suspended = 1; chip->erase_suspended = 1;
for (;;) { for (;;) {
if (chip_ready(map, adr)) if (chip_ready(map, adr, NULL))
break; break;
if (time_after(jiffies, timeo)) { if (time_after(jiffies, timeo)) {
@ -1361,7 +1371,7 @@ static int do_otp_lock(struct map_info *map, struct flchip *chip, loff_t adr,
/* wait for chip to become ready */ /* wait for chip to become ready */
timeo = jiffies + msecs_to_jiffies(2); timeo = jiffies + msecs_to_jiffies(2);
for (;;) { for (;;) {
if (chip_ready(map, adr)) if (chip_ready(map, adr, NULL))
break; break;
if (time_after(jiffies, timeo)) { if (time_after(jiffies, timeo)) {
@ -1631,7 +1641,8 @@ static int __xipram do_write_oneword(struct map_info *map, struct flchip *chip,
* We check "time_after" and "!chip_good" before checking * We check "time_after" and "!chip_good" before checking
* "chip_good" to avoid the failure due to scheduling. * "chip_good" to avoid the failure due to scheduling.
*/ */
if (time_after(jiffies, timeo) && !chip_good(map, adr, datum)) { if (time_after(jiffies, timeo) &&
!chip_good(map, adr, &datum)) {
xip_enable(map, chip, adr); xip_enable(map, chip, adr);
printk(KERN_WARNING "MTD %s(): software timeout\n", __func__); printk(KERN_WARNING "MTD %s(): software timeout\n", __func__);
xip_disable(map, chip, adr); xip_disable(map, chip, adr);
@ -1639,7 +1650,7 @@ static int __xipram do_write_oneword(struct map_info *map, struct flchip *chip,
break; break;
} }
if (chip_good(map, adr, datum)) if (chip_good(map, adr, &datum))
break; break;
/* Latency issues. Drop the lock, wait a while and retry */ /* Latency issues. Drop the lock, wait a while and retry */
@ -1883,13 +1894,13 @@ static int __xipram do_write_buffer(struct map_info *map, struct flchip *chip,
} }
/* /*
* We check "time_after" and "!chip_good" before checking "chip_good" to avoid * We check "time_after" and "!chip_good" before checking
* the failure due to scheduling. * "chip_good" to avoid the failure due to scheduling.
*/ */
if (time_after(jiffies, timeo) && !chip_good(map, adr, datum)) if (time_after(jiffies, timeo) && !chip_good(map, adr, &datum))
break; break;
if (chip_good(map, adr, datum)) { if (chip_good(map, adr, &datum)) {
xip_enable(map, chip, adr); xip_enable(map, chip, adr);
goto op_done; goto op_done;
} }
@ -2023,7 +2034,7 @@ static int cfi_amdstd_panic_wait(struct map_info *map, struct flchip *chip,
* If the driver thinks the chip is idle, and no toggle bits * If the driver thinks the chip is idle, and no toggle bits
* are changing, then the chip is actually idle for sure. * are changing, then the chip is actually idle for sure.
*/ */
if (chip->state == FL_READY && chip_ready(map, adr)) if (chip->state == FL_READY && chip_ready(map, adr, NULL))
return 0; return 0;
/* /*
@ -2040,7 +2051,7 @@ static int cfi_amdstd_panic_wait(struct map_info *map, struct flchip *chip,
/* wait for the chip to become ready */ /* wait for the chip to become ready */
for (i = 0; i < jiffies_to_usecs(timeo); i++) { for (i = 0; i < jiffies_to_usecs(timeo); i++) {
if (chip_ready(map, adr)) if (chip_ready(map, adr, NULL))
return 0; return 0;
udelay(1); udelay(1);
@ -2104,13 +2115,13 @@ retry:
map_write(map, datum, adr); map_write(map, datum, adr);
for (i = 0; i < jiffies_to_usecs(uWriteTimeout); i++) { for (i = 0; i < jiffies_to_usecs(uWriteTimeout); i++) {
if (chip_ready(map, adr)) if (chip_ready(map, adr, NULL))
break; break;
udelay(1); udelay(1);
} }
if (!chip_good(map, adr, datum)) { if (!chip_ready(map, adr, &datum)) {
/* reset on all failures. */ /* reset on all failures. */
map_write(map, CMD(0xF0), chip->start); map_write(map, CMD(0xF0), chip->start);
/* FIXME - should have reset delay before continuing */ /* FIXME - should have reset delay before continuing */
@ -2251,6 +2262,7 @@ static int __xipram do_erase_chip(struct map_info *map, struct flchip *chip)
DECLARE_WAITQUEUE(wait, current); DECLARE_WAITQUEUE(wait, current);
int ret = 0; int ret = 0;
int retry_cnt = 0; int retry_cnt = 0;
map_word datum = map_word_ff(map);
adr = cfi->addr_unlock1; adr = cfi->addr_unlock1;
@ -2305,7 +2317,7 @@ static int __xipram do_erase_chip(struct map_info *map, struct flchip *chip)
chip->erase_suspended = 0; chip->erase_suspended = 0;
} }
if (chip_good(map, adr, map_word_ff(map))) if (chip_ready(map, adr, &datum))
break; break;
if (time_after(jiffies, timeo)) { if (time_after(jiffies, timeo)) {
@ -2347,6 +2359,7 @@ static int __xipram do_erase_oneblock(struct map_info *map, struct flchip *chip,
DECLARE_WAITQUEUE(wait, current); DECLARE_WAITQUEUE(wait, current);
int ret = 0; int ret = 0;
int retry_cnt = 0; int retry_cnt = 0;
map_word datum = map_word_ff(map);
adr += chip->start; adr += chip->start;
@ -2401,7 +2414,7 @@ static int __xipram do_erase_oneblock(struct map_info *map, struct flchip *chip,
chip->erase_suspended = 0; chip->erase_suspended = 0;
} }
if (chip_good(map, adr, map_word_ff(map))) { if (chip_ready(map, adr, &datum)) {
xip_enable(map, chip, adr); xip_enable(map, chip, adr);
break; break;
} }
@ -2616,7 +2629,7 @@ static int __maybe_unused do_ppb_xxlock(struct map_info *map,
*/ */
timeo = jiffies + msecs_to_jiffies(2000); /* 2s max (un)locking */ timeo = jiffies + msecs_to_jiffies(2000); /* 2s max (un)locking */
for (;;) { for (;;) {
if (chip_ready(map, adr)) if (chip_ready(map, adr, NULL))
break; break;
if (time_after(jiffies, timeo)) { if (time_after(jiffies, timeo)) {

View File

@ -315,7 +315,6 @@ out_mapping:
ubi->volumes[vol_id] = NULL; ubi->volumes[vol_id] = NULL;
ubi->vol_count -= 1; ubi->vol_count -= 1;
spin_unlock(&ubi->volumes_lock); spin_unlock(&ubi->volumes_lock);
ubi_eba_destroy_table(eba_tbl);
out_acc: out_acc:
spin_lock(&ubi->volumes_lock); spin_lock(&ubi->volumes_lock);
ubi->rsvd_pebs -= vol->reserved_pebs; ubi->rsvd_pebs -= vol->reserved_pebs;

View File

@ -2317,6 +2317,7 @@ static int mv88e6xxx_mdios_register(struct mv88e6xxx_chip *chip,
*/ */
child = of_get_child_by_name(np, "mdio"); child = of_get_child_by_name(np, "mdio");
err = mv88e6xxx_mdio_register(chip, child, false); err = mv88e6xxx_mdio_register(chip, child, false);
of_node_put(child);
if (err) if (err)
return err; return err;

View File

@ -174,7 +174,8 @@ static int altera_tse_mdio_create(struct net_device *dev, unsigned int id)
mdio = mdiobus_alloc(); mdio = mdiobus_alloc();
if (mdio == NULL) { if (mdio == NULL) {
netdev_err(dev, "Error allocating MDIO bus\n"); netdev_err(dev, "Error allocating MDIO bus\n");
return -ENOMEM; ret = -ENOMEM;
goto put_node;
} }
mdio->name = ALTERA_TSE_RESOURCE_NAME; mdio->name = ALTERA_TSE_RESOURCE_NAME;
@ -191,6 +192,7 @@ static int altera_tse_mdio_create(struct net_device *dev, unsigned int id)
mdio->id); mdio->id);
goto out_free_mdio; goto out_free_mdio;
} }
of_node_put(mdio_node);
if (netif_msg_drv(priv)) if (netif_msg_drv(priv))
netdev_info(dev, "MDIO bus %s: created\n", mdio->id); netdev_info(dev, "MDIO bus %s: created\n", mdio->id);
@ -200,6 +202,8 @@ static int altera_tse_mdio_create(struct net_device *dev, unsigned int id)
out_free_mdio: out_free_mdio:
mdiobus_free(mdio); mdiobus_free(mdio);
mdio = NULL; mdio = NULL;
put_node:
of_node_put(mdio_node);
return ret; return ret;
} }

Some files were not shown because too many files have changed in this diff Show More