diff options
| author | Vignesh Raghavendra <vigneshr@ti.com> | 2023-12-20 10:45:59 +0530 |
|---|---|---|
| committer | Vignesh Raghavendra <vigneshr@ti.com> | 2023-12-20 11:03:59 +0530 |
| commit | e5842fb2bdaa92e4c60227a2e4e1137dea043662 (patch) | |
| tree | c0ce0a780303cf6e3cfa152f784c5c5e8e3c56b1 /drivers/acpi/device_sysfs.c | |
| parent | 8440471ab9b946750b3101fadb3f66ddf5ca9d3c (diff) | |
| parent | e7cddbb41b63252ddb5b7f8247da5d0b24adfac5 (diff) | |
Merge tag 'v6.1.67' of https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux into ti-linux-6.1.y-cicd
This is the 6.1.67 stable release
* tag 'v6.1.67' of https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux: (3167 commits)
Linux 6.1.67
Revert "wifi: cfg80211: fix CQM for non-range use"
Linux 6.1.66
iomap: update ki_pos a little later in iomap_dio_complete
x86/apic/msi: Fix misconfigured non-maskable MSI quirk
x86/xen: fix percpu vcpu_info allocation
xen: simplify evtchn_do_upcall() call maze
xen: Allow platform PCI interrupt to be shared
r8169: fix deadlock on RTL8125 in jumbo mtu mode
r8169: disable ASPM in case of tx timeout
drm/amd/display: Fix MPCC 1DLUT programming
drm/amd/display: Fix the delta clamping for shaper LUT
drm/amd/display: clean code-style issues in dcn30_set_mpc_shaper_3dlut
drm/amd/display: Expand kernel doc for DC
mmc: sdhci-sprd: Fix vqmmc not shutting down after the card was pulled
mmc: core: add helpers mmc_regulator_enable/disable_vqmmc
drm/amd/pm: fix a memleak in aldebaran_tables_init
iommu/vt-d: Make context clearing consistent with context mapping
iommu/vt-d: Disable PCI ATS in legacy passthrough mode
iommu/vt-d: Add device_block_translation() helper
...
Signed-off-by: Vignesh Raghavendra <vigneshr@ti.com>
Diffstat (limited to 'drivers/acpi/device_sysfs.c')
| -rw-r--r-- | drivers/acpi/device_sysfs.c | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/drivers/acpi/device_sysfs.c b/drivers/acpi/device_sysfs.c index 120873dad2cc..c727fb320eee 100644 --- a/drivers/acpi/device_sysfs.c +++ b/drivers/acpi/device_sysfs.c @@ -158,8 +158,8 @@ static int create_pnp_modalias(struct acpi_device *acpi_dev, char *modalias, return 0; len = snprintf(modalias, size, "acpi:"); - if (len <= 0) - return len; + if (len >= size) + return -ENOMEM; size -= len; @@ -212,8 +212,10 @@ static int create_of_modalias(struct acpi_device *acpi_dev, char *modalias, len = snprintf(modalias, size, "of:N%sT", (char *)buf.pointer); ACPI_FREE(buf.pointer); - if (len <= 0) - return len; + if (len >= size) + return -ENOMEM; + + size -= len; of_compatible = acpi_dev->data.of_compatible; if (of_compatible->type == ACPI_TYPE_PACKAGE) { |
