In rt5663_parse_dp, the function device_property_read_u32_array() can
return an error. This fix adds a check to the latter as well as to the
callsite of rt5663_parse_dp in rt5663_i2c_probe.
Signed-off-by: Aditya Pakki
---
sound/soc/codecs/rt5663.c | 9 ++---
1 file changed, 6 insertions
In sd_execute_write_data, the rtsx_send_cmd could fail with ETIMEDOUT
or EIO. The fix adds a check to handle these failures.
Signed-off-by: Aditya Pakki
---
drivers/staging/rts5208/sd.c | 7 ++-
1 file changed, 6 insertions(+), 1 deletion(-)
diff --git a/drivers/staging/rts5208/sd.c b
When nla_parse fails, we should not use the results (the first
argument). The fix checks if it fails, and if so, returns its error code
upstream.
Signed-off-by: Aditya Pakki
---
net/netfilter/ipset/ip_set_core.c | 9 +++--
1 file changed, 7 insertions(+), 2 deletions(-)
diff --git a/net
of_get_next_available_child returns NULL when no child nodes are found.
The fix checks its return value instead of assuming a child is found.
Signed-off-by: Aditya Pakki
---
drivers/usb/chipidea/ci_hdrc_msm.c | 4
1 file changed, 4 insertions(+)
diff --git a/drivers/usb/chipidea
nla_put() may fail. The fix adds a check for its return value, and
returns -EMSGSIZE if it fails, post canceling netlink msg.
Signed-off-by: Aditya Pakki
---
drivers/infiniband/core/addr.c | 5 -
1 file changed, 4 insertions(+), 1 deletion(-)
diff --git a/drivers/infiniband/core/addr.c b
The fix inserts multiple checks for nla_put, and changes the return type of
ib_nl_set_path_rec_attrs() from void to int
Signed-off-by: Aditya Pakki
---
drivers/infiniband/core/sa_query.c | 56 --
1 file changed, 38 insertions(+), 18 deletions(-)
diff --git a/drivers
In adp8870_bl_ambient_light_zone_store, set, clear, and write
can return an error but are not checked. The fix adds a check for these
cases and returns -1 to match the return type (ssize_t).
Signed-off-by: Aditya Pakki
---
drivers/video/backlight/adp8870_bl.c | 16 +---
1 file
clk_prepare() could fail, so let's check its status, and if it fails,
issue an error message and change the clock_entry_status to
PCE_STATUS_ERROR
Signed-off-by: Aditya Pakki
---
drivers/base/power/clock_ops.c | 13 +
1 file changed, 9 insertions(+), 4 deletions(-)
diff --
rtw_wps_start() is part of dead code due to CONFIG_INTEL_WIDI.
The fix removes the deadcode and replaces the function with NULL
in rtw_private_handler. Identified as part of copy_from_user bug.
Signed-off-by: Aditya Pakki
---
.../staging/rtl8723bs/os_dep/ioctl_linux.c| 34
snd_i2c_sendbytes could fail. The fix checks its return value: if it
fails, issues an error message and returns with its error code.
Signed-off-by: Aditya Pakki
---
sound/pci/ice1712/ews.c | 7 ++-
1 file changed, 6 insertions(+), 1 deletion(-)
diff --git a/sound/pci/ice1712/ews.c b/sound
The fix checks if snd_card_register() fails, and if so logs the error
via dev_err() consistent with other patches.
Signed-off-by: Aditya Pakki
---
sound/usb/line6/pod.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/sound/usb/line6/pod.c b/sound/usb/line6/pod.c
index
snd_ctl_add() could fail, so let's check its return value and return its
error code upstream upon failure.
Signed-off-by: Aditya Pakki
---
sound/isa/sb/sb16_main.c | 10 +++---
1 file changed, 7 insertions(+), 3 deletions(-)
diff --git a/sound/isa/sb/sb16_main.c b/sound/isa/sb/sb16_m
devres_release can return -ENOENT if the device is not freed. The fix
throws a warning consistent with other invocations.
Signed-off-by: Aditya Pakki
---
drivers/char/hw_random/core.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/drivers/char/hw_random/core.c b/drivers
regmap_bulk_read() can return a non zero value on failure. The fix
checks if the function call succeeded before calling mod_timer. The
issue was identified by a static analysis tool.
Signed-off-by: Aditya Pakki
---
drivers/input/touchscreen/ad7879.c | 11 +++
1 file changed, 7
ever, maintainers identified the patch fixing the issue is not
required as function rts_wps_start() is dead code and can be removed.
Signed-off-by: Aditya Pakki
---
.../staging/rtl8723bs/os_dep/ioctl_linux.c| 34 +--
1 file changed, 1 insertion(+), 33 deletions(-)
diff --git a/dri
Currently, the return value of copy_from_user is not checked.
extra is assigned to u32wps_start irrespective of these failures.
Signed-off-by: Aditya Pakki
---
drivers/staging/rtl8723bs/os_dep/ioctl_linux.c | 9 +++--
1 file changed, 7 insertions(+), 2 deletions(-)
diff --git a/drivers
In tipc_nl_compat_sk_dump(), if nla_parse_nested() fails, it could return
an error. To be consistent with other invocations of the function call,
on error, the fix passes the return value upstream.
Signed-off-by: Aditya Pakki
---
net/tipc/netlink_compat.c | 7 +--
1 file changed, 5
In net_ns_init(), register_pernet_subsys() could fail while registering
network namespace subsystems. The fix checks the return value and
sends a panic() on failure.
Signed-off-by: Aditya Pakki
---
net/core/net_namespace.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a
In lgdt3306a.c, lgdt3306a_read_signal_strength() can fail while reading
the registers via lgdt3306a_read_reg(). The function can return an error
from i2c_transfer(). The fix checks the return value for this failure.
Signed-off-by: Aditya Pakki
---
drivers/media/dvb-frontends/lgdt3306a.c | 5
In mspro_stop_seq_mode(), ms_send_cmd() may fail. The patch attempts
to detect a failure before flushing the registers via rtsx_write_register.
Signed-off-by: Aditya Pakki
---
drivers/staging/rts5208/ms.c | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/drivers/staging
While flushing the cache via ipv6_sysctl_rtcache_flush(), the call
to proc_dointvec() may fail. The fix adds a check that returns the
error, on failure.
Signed-off-by: Aditya Pakki
---
net/ipv6/route.c | 6 +-
1 file changed, 5 insertions(+), 1 deletion(-)
diff --git a/net/ipv6/route.c b
platform_device_add() may fail in intel_scu_devices_create and
sfi_handle_ipc_dev. The fix checks for the return value in these cases
and displays the failed device.
Signed-off-by: Aditya Pakki
---
arch/x86/platform/intel-mid/sfi.c | 16
1 file changed, 12 insertions(+), 4
In of_qcom_slim_ngd_register, the function platform_device_add() may fail.
The fix returns the error value upstream in case of failure.
Signed-off-by: Aditya Pakki
---
drivers/slimbus/qcom-ngd-ctrl.c | 6 +-
1 file changed, 5 insertions(+), 1 deletion(-)
diff --git a/drivers/slimbus/qcom
ics932s401_update_device may fail reading in i2c_smbus_read_word_data
due to error in i2c_smbus_xfer. The fix checks the status and defaults
the register to 0.
Signed-off-by: Aditya Pakki
---
drivers/misc/ics932s401.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/drivers/misc/ics932s401
dma_async_device_register() may fail and return an error. The capabilities
checked in mv_xor_channel_add() are not complete. The fix handles the
error by freeing the resources.
Signed-off-by: Aditya Pakki
---
drivers/dma/mv_xor.c | 5 -
1 file changed, 4 insertions(+), 1 deletion(-)
diff
rtnl_link_register() may fail and can impact registering the device.
The fix checks the return value and pushes the error upstream.
Signed-off-by: Aditya Pakki
---
net/batman-adv/main.c | 5 -
1 file changed, 4 insertions(+), 1 deletion(-)
diff --git a/net/batman-adv/main.c b/net/batman
idr_find() may fail and return a NULL pointer. The fix checks the
return value of the function and returns an error in case of NULL.
Signed-off-by: Aditya Pakki
---
drivers/infiniband/hw/qedr/qedr_iw_cm.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/drivers/infiniband/hw/qedr
regmap_bulk_read() can return a non zero value on failure. The fix
checks if the function call succeeded before calling mod_timer.
Signed-off-by: Aditya Pakki
---
drivers/input/touchscreen/ad7879.c | 7 ---
1 file changed, 4 insertions(+), 3 deletions(-)
diff --git a/drivers/input
Currently, vc5_pll_recalc_rate() may produce incorrect output when
regmap_bulk_read() fails. The fix checks the return value of the
latter function and returns 0 in case of failure.
Signed-off-by: Aditya Pakki
---
drivers/clk/clk-versaclock5.c | 3 ++-
1 file changed, 2 insertions(+), 1
cudbg_collect_hw_sched() could fail when the function cudg_get_buffer()
returns an error. The fix adds a check to the latter function returning
error on failure
Signed-off-by: Aditya Pakki
---
drivers/net/ethernet/chelsio/cxgb4/cudbg_lib.c | 4
1 file changed, 4 insertions(+)
diff --git a
In lenovo_probe_tpkbd(), the function of_led_classdev_register() could
return an error value that is unchecked. The fix adds these checks.
Signed-off-by: Aditya Pakki
---
drivers/hid/hid-lenovo.c | 10 --
1 file changed, 8 insertions(+), 2 deletions(-)
diff --git a/drivers/hid/hid
In function alienware_zone_init, the function led_classdev_register
can return an error on failure. The fix checks the error and frees
the allocated resources.
Signed-off-by: Aditya Pakki
---
drivers/platform/x86/alienware-wmi.c | 13 -
1 file changed, 12 insertions(+), 1 deletion
devres_release can return -ENOENT if the device is not freed. The fix
throws a warning consistent with other invocations.
Signed-off-by: Aditya Pakki
---
drivers/char/hw_random/core.c | 6 +-
1 file changed, 5 insertions(+), 1 deletion(-)
diff --git a/drivers/char/hw_random/core.c b
xgmiitorgmii_read_status() could fail when writing to the bus via
mdiobus_write(). The fix adds a check and returns an error in case
of failure.
Signed-off-by: Aditya Pakki
---
drivers/net/phy/xilinx_gmii2rgmii.c | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/drivers/net
phy_mii_ioctl() could fail when writing to the bus via
mdiobus_write(). The fix adds a check and returns an error in case
of failure.
Signed-off-by: Aditya Pakki
---
drivers/net/phy/phy.c | 7 +--
1 file changed, 5 insertions(+), 2 deletions(-)
diff --git a/drivers/net/phy/phy.c b/drivers
devres_release can return -ENOENT if the device is not freed. The fix
throws a warning consistent with other invocations.
Signed-off-by: Aditya Pakki
---
mm/hmm.c | 8 ++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/mm/hmm.c b/mm/hmm.c
index 90c34f3d1243..b06e3f092fbf
In bnxt_qplib_map_tc2cos(), bnxt_qplib_rcfw_send_message() can return
an error value. The fix returns the error from the latter function
upstream.
Signed-off-by: Aditya Pakki
---
drivers/infiniband/hw/bnxt_re/qplib_sp.c | 5 ++---
1 file changed, 2 insertions(+), 3 deletions(-)
diff --git a
In sysctl_extfrag_handler(), proc_dointvec_minmax() can return an
error. The fix propagates the error upstream in case of failure.
Signed-off-by: Aditya Pakki
---
mm/compaction.c | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/mm/compaction.c b/mm/compaction.c
index
In sysctl_extfrag_handler(), proc_dointvec_minmax() can return an
error. The fix propagates the error upstream in case of failure.
Signed-off-by: Aditya Pakki
---
mm/compaction.c | 4 +---
1 file changed, 1 insertion(+), 3 deletions(-)
diff --git a/mm/compaction.c b/mm/compaction.c
index
Write16 can return an error code -1 when the i2c_write fails. The
fix checks for these failures and returns the error upstream
Signed-off-by: Aditya Pakki
---
drivers/media/dvb-frontends/drxd_hard.c | 30 -
1 file changed, 19 insertions(+), 11 deletions(-)
diff --git a
In sp8870_set_frontend_parameters, the function sp8870_readreg
may return an error when i2c_transfer fails. The fix checks for
this error and returns upstream consistent with other invocations.
Signed-off-by: Aditya Pakki
---
drivers/media/dvb-frontends/sp8870.c | 4 +++-
1 file changed, 3
In ms_copy_page, the function ms_read_extra_data may fail for many
reasons. The fix adds a check similar to other invocation to return
error upstream.
Signed-off-by: Aditya Pakki
---
drivers/staging/rts5208/ms.c | 5 -
1 file changed, 4 insertions(+), 1 deletion(-)
diff --git a/drivers
In function xadc_probe, xadc_write_adc_reg can return an error value
when write fails. The fix checks for the return value consistent with
other invocations of the latter function.
Signed-off-by: Aditya Pakki
---
drivers/iio/adc/xilinx-xadc-core.c | 4 +++-
1 file changed, 3 insertions(+), 1
In rv8803_handle_irq, rv8803_write_reg can return a failed return
value when attempting to write to the bus. The fix checks the output
and throws a dev_warn notifying of the failure.
Signed-off-by: Aditya Pakki
---
drivers/rtc/rtc-rv8803.c | 9 +++--
1 file changed, 7 insertions(+), 2
In po1030_probe(), m5602_write_bridge() can timeout and return an error
value. The fix checks for the return value and propagates upstream
consistent with other usb drivers.
Signed-off-by: Aditya Pakki
---
drivers/media/usb/gspca/m5602/m5602_po1030.c | 8 ++--
1 file changed, 6 insertions
In mt9m111_probe, m5602_write_bridge can timeout and return a negative
error value. The fix checks for this error and passes it upstream.
Signed-off-by: Aditya Pakki
---
drivers/media/usb/gspca/m5602/m5602_mt9m111.c | 8 +---
1 file changed, 5 insertions(+), 3 deletions(-)
diff --git a
In stm32_mdma_probe, after reading the property "st,ahb-addr-masks", the
second call is not checked for failure. This time of check to time of use
case of "count" error is sent upstream.
Signed-off-by: Aditya Pakki
---
drivers/dma/stm32-mdma.c | 4 +++-
1 file changed
While initializing the driver, the function platform_driver_register can
fail and return an error. Consistent with other invocations, this patch
returns the error upstream.
Signed-off-by: Aditya Pakki
---
drivers/bluetooth/hci_bcm.c | 7 ++-
1 file changed, 6 insertions(+), 1 deletion
While initializing the driver, the function platform_driver_register can
fail and return an error. Consistent with other invocations, this patch
returns the error upstream.
Signed-off-by: Aditya Pakki
---
drivers/bluetooth/hci_intel.c | 6 +-
1 file changed, 5 insertions(+), 1 deletion
While initializing the driver, the function platform_driver_register can
fail and return an error. Consistent with other invocations, this patch
returns the error upstream.
Signed-off-by: Aditya Pakki
---
drivers/mfd/sm501.c | 6 +-
1 file changed, 5 insertions(+), 1 deletion(-)
diff --git
While initializing the driver, the function platform_driver_register can
fail and return an error. Consistent with other invocations, this patch
returns the error upstream.
Signed-off-by: Aditya Pakki
---
drivers/dma/qcom/hidma_mgmt.c | 3 +--
1 file changed, 1 insertion(+), 2 deletions
kmalloc can fail in rsi_register_rates_channels but memcpy still attempts
to write to channels. The patch checks and avoids such a situation.
Signed-off-by: Aditya Pakki
---
drivers/net/wireless/rsi/rsi_91x_mac80211.c | 10 ++
1 file changed, 10 insertions(+)
diff --git a/drivers/net
Memory allocated, using kmalloc, for new_compat may fail. This patch
checks for such an error and prevents potential NULL pointer
dereference.
Signed-off-by: Aditya Pakki
---
drivers/video/fbdev/omap2/omapfb/dss/omapdss-boot-init.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/drivers
kmalloc_node might fail to allocate memory for thp field. This fix
attempts to avoid a potential NULL pointer dereference.
Signed-off-by: Aditya Pakki
---
arch/x86/platform/uv/tlb_uv.c | 3 +++
1 file changed, 3 insertions(+)
diff --git a/arch/x86/platform/uv/tlb_uv.c b/arch/x86/platform/uv
Allocating memory via kzalloc for phi may fail and causes a
NULL pointer dereference. This patch avoids such a scenario.
Signed-off-by: Aditya Pakki
---
drivers/isdn/hardware/mISDN/hfcsusb.c | 3 +++
1 file changed, 3 insertions(+)
diff --git a/drivers/isdn/hardware/mISDN/hfcsusb.c
b/drivers
lookup variable on failure of allocating memory via devm_kzalloc
can cause a NULL pointer dereference. This patch avoids such a scenario.
Signed-off-by: Aditya Pakki
---
drivers/mfd/sm501.c | 3 +++
1 file changed, 3 insertions(+)
diff --git a/drivers/mfd/sm501.c b/drivers/mfd/sm501.c
index
saved-context in byt_gpio_probe is allocated via devm_kcalloc and is
used without checking for NULL in later functions. This patch avoids
such a scenario.
Signed-off-by: Aditya Pakki
---
drivers/pinctrl/intel/pinctrl-baytrail.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/drivers
axp20x_build_funcs_groups allocates groups via devm_kcalloc and tries to
dereference without checking for NULL. This patch avoids such a
scenario.
Signed-off-by: Aditya Pakki
---
drivers/pinctrl/pinctrl-axp209.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/drivers/pinctrl/pinctrl
phydm.internal is allocated using kzalloc which is used multiple
times without a check for NULL pointer. This patch avoids such a
scenario.
Signed-off-by: Aditya Pakki
---
drivers/staging/rtlwifi/phydm/rtl_phydm.c | 3 +++
1 file changed, 3 insertions(+)
diff --git a/drivers/staging/rtlwifi
skb allocated via dev_alloc_skb can fail and return a NULL pointer.
This patch avoids such a scenario and returns, consistent with other
invocations.
Signed-off-by: Aditya Pakki
---
drivers/staging/rtlwifi/rtl8822be/fw.c | 3 +++
1 file changed, 3 insertions(+)
diff --git a/drivers/staging
pch_alloc_dma_buf allocated tx, rx DMA buffers which can fail. Further,
these buffers are used without a check. The patch checks for these
failures and sends the error upstream.
Signed-off-by: Aditya Pakki
---
drivers/spi/spi-topcliff-pch.c | 15 +--
1 file changed, 13 insertions
hwxmits is allocated via kcalloc and not checked for failure before its
dereference. The patch fixes this problem similar to rtl8723bs.
Signed-off-by: Aditya Pakki
---
drivers/staging/rtl8188eu/core/rtw_xmit.c | 4
1 file changed, 4 insertions(+)
diff --git a/drivers/staging/rtl8188eu
The resource release in sm501fb_remove() is not in the inverse order of
sm501fb_probe(), for the buffers. Release the info object after
deallocating the buffers.
Signed-off-by: Aditya Pakki
---
drivers/video/fbdev/sm501fb.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a
In virtio_fs_get_tree, after fm is freed, it is again freed in case
s_root is NULL and virtio_fs_fill_super() returns an error. To avoid
a double free, set fm to NULL.
Signed-off-by: Aditya Pakki
---
fs/fuse/virtio_fs.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/fs/fuse/virtio_fs.c b
In case of rs failure in rds_send_remove_from_sock(), the 'rm' resource
is freed and later under spinlock, causing potential use-after-free.
Set the free pointer to NULL to avoid undefined behavior.
Signed-off-by: Aditya Pakki
---
net/rds/message.c | 1 +
net/rds/send.c| 2 +
In gss_pipe_destroy_msg(), in case of error in msg, gss_release_msg
deletes gss_msg. The patch adds a check to avoid a potential double
free.
Signed-off-by: Aditya Pakki
---
net/sunrpc/auth_gss/auth_gss.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/net/sunrpc/auth_gss
if_info is a local variable that is passed to beiscsi_if_get_info. In
case of failure, the variable is free'd but not reset to NULL. The patch
avoids security issue by passing NULL to if_info.
Signed-off-by: Aditya Pakki
---
drivers/scsi/be2iscsi/be_iscsi.c | 2 ++
1 file changed, 2 inser
Memory allocated via kmemdup might fail and return a NULL pointer.
This patch adds a check on the return value of kmemdup and passes the
error upstream.
Signed-off-by: Aditya Pakki
---
drivers/thunderbolt/switch.c | 15 +++
1 file changed, 11 insertions(+), 4 deletions(-)
diff
of_match_device can return NULL if no matching device is found. This patch
checks and returns -ENODEV in such a scenario.
Signed-off-by: Aditya Pakki
---
drivers/firmware/arm_scmi/driver.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/drivers/firmware/arm_scmi/driver.c
b/drivers
of_match_device can return NULL if no matching device is found. The patches
avoids a scenario causing null pointer dereference.
Signed-off-by: Aditya Pakki
---
drivers/mfd/mc13xxx-i2c.c | 2 ++
drivers/mfd/mc13xxx-spi.c | 2 ++
2 files changed, 4 insertions(+)
diff --git a/drivers/mfd/mc13xxx
of_match_device can return NULL if there is no matching device is found.
The patch avoids a potential NULL pointer dereference by checking for the
return value and passing the error upstream.
Signed-off-by: Aditya Pakki
---
drivers/mtd/nand/raw/vf610_nfc.c | 2 ++
1 file changed, 2 insertions
of_match_device can return a NULL value when the matching device is
not found. The patch avoids a potential dereference in such scenario.
Signed-off-by: Aditya Pakki
---
drivers/pinctrl/berlin/berlin-bg4ct.c | 3 +++
1 file changed, 3 insertions(+)
diff --git a/drivers/pinctrl/berlin/berlin
of_match_device in as370_pinctrl_probe can return a NULL value
when the matching device is not found. The patch avoids a potential
dereference in such scenario.
Signed-off-by: Aditya Pakki
---
drivers/pinctrl/berlin/pinctrl-as370.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/drivers
of_match_device can return a NULL pointer when matching device is not
found. This patch avoids a scenario causing NULL pointer derefernce.
Signed-off-by: Aditya Pakki
---
drivers/tty/serial/max310x.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/drivers/tty/serial/max310x.c b/drivers
of_match_device on failure to find a matching device can return a NULL
pointer. The patch checks for such a scenrio and passes the error upstream.
Signed-off-by: Aditya Pakki
---
drivers/tty/serial/mvebu-uart.c | 3 +++
1 file changed, 3 insertions(+)
diff --git a/drivers/tty/serial/mvebu
of_match_node can fail and return NULL in case no matching structure.
The patches checks for such a scenario and returns -ENXIO.
Signed-off-by: Aditya Pakki
---
drivers/mmc/host/dw_mmc-exynos.c | 2 ++
drivers/mmc/host/dw_mmc-k3.c | 2 ++
drivers/mmc/host/dw_mmc-pltfm.c | 2 ++
3 files
In gen_pci_probe, of_match_node can return a NULL pointer in case of
failure. The patch avoids a NULL pointer dereference in such a scenario.
Signed-off-by: Aditya Pakki
---
drivers/pci/controller/pci-host-generic.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/drivers/pci/controller
In sirf_audio_codec_driver_probe, of_match_node may fail and return a
NULL pointer. The patch avoids a potential NULL pointer dereference.
Signed-off-by: Aditya Pakki
---
sound/soc/codecs/sirf-audio-codec.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/sound/soc/codecs/sirf-audio
In of_qcom_slim_ngd_register, of_match_node may fail and return a NULL
pointer. This patch avoids such a scenario leading to NULL pointer
dereference.
Fixes: 458a445deb9c ("slimbus: ngd: Fix build error on x86")
Signed-off-by: Aditya Pakki
---
drivers/slimbus/qcom-ngd-ctrl.c | 2
of_match_node can fail and return NULL in case no matching structure.
The patches checks for such a scenario and returns -ENXIO.
---
V1: Added files dw_mmc-zx.c and dw_mmc-rockchip.c
Signed-off-by: Aditya Pakki
---
drivers/mmc/host/dw_mmc-exynos.c | 2 ++
drivers/mmc/host/dw_mmc-k3.c
hpet_virt_address may be NULL when ioremap_nocache fails. The patch
checks for such a scenario and avoids NULL pointer dereference.
Signed-off-by: Aditya Pakki
---
arch/x86/kernel/hpet.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/arch/x86/kernel/hpet.c b/arch/x86/kernel/hpet.c
index
load_nls may fail and return an error message. The patch checks
for such a scenario and passes the error upstream.
Signed-off-by: Aditya Pakki
---
fs/udf/super.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/fs/udf/super.c b/fs/udf/super.c
index ffd8038ff728..1a38271de6d9 100644
--- a
ida_simple_get on failure can return an error. The patch ensures that
the dev_set_name is set on non failure cases.
Signed-off-by: Aditya Pakki
---
drivers/thunderbolt/xdomain.c | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/drivers/thunderbolt/xdomain.c b/drivers
ida_simple_get on failure can return an error. The patch ensures that
the dev_set_name is set on non failure cases.
Signed-off-by: Aditya Pakki
---
drivers/thunderbolt/xdomain.c | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/drivers/thunderbolt/xdomain.c b/drivers
uuid in add_switch is allocted via kmemdup which can fail. The patch
logs the error in such a scenario.
Signed-off-by: Aditya Pakki
---
drivers/thunderbolt/icm.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/drivers/thunderbolt/icm.c b/drivers/thunderbolt/icm.c
index e3fc920af682
kmemdup can fail to allocate memory and result in a NULL pointer
dereference. The patches avoids such a scenario.
Signed-off-by: Aditya Pakki
---
drivers/fmc/fmc-fakedev.c | 8
1 file changed, 8 insertions(+)
diff --git a/drivers/fmc/fmc-fakedev.c b/drivers/fmc/fmc-fakedev.c
index
phydm.internal is allocated using kzalloc which is used multiple
times without a check for NULL pointer. This patch avoids such a
scenario.
--
v1: Patch collision with different things, fix as per Greg
Signed-off-by: Aditya Pakki
---
drivers/staging/rtlwifi/phydm/rtl_phydm.c | 2 ++
1 file
skb allocated via dev_alloc_skb can fail and return a NULL pointer.
This patch avoids such a scenario and returns, consistent with other
invocations.
---
v1: Patch collision with rtl_phydm.c, fix as per Greg
Signed-off-by: Aditya Pakki
---
drivers/staging/rtlwifi/rtl8822be/fw.c | 2 ++
1 file
hwxmits is allocated via kcalloc and not checked for failure before its
dereference. The patch fixes this problem by returning an error in
rtl8723bs.
---
v1: Return error and remove print in case of failure, per Greg
Signed-off-by: Aditya Pakki
---
drivers/staging/rtl8188eu/core/rtw_xmit.c
Unlike other drivers probe method, of_match_node return value
is not used or checked. This patch removes the redundant code.
---
v1: A check is unnecessary as match is never used.
Signed-off-by: Aditya Pakki
---
sound/soc/codecs/sirf-audio-codec.c | 3 ---
1 file changed, 3 deletions(-)
diff
phydm.internal is allocated using kzalloc which is used multiple
times without a check for NULL pointer. This patch avoids such a
scenario by returning 0, consistent with the failure case.
Signed-off-by: Aditya Pakki
---
v2: Move the signed off line above
v1: Patch collision with different
Memory allocated via kmemdup might fail and return a NULL pointer.
This patch adds a check on the return value of kmemdup and passes the
error upstream.
Signed-off-by: Aditya Pakki
---
v1: Missed check on tb_sw_read, suggested by Mukesh
---
drivers/thunderbolt/switch.c | 22
In enumerate_services, ida_simple_get on failure can return an error and
leaks memory during device_register failure. The patch ensures that
the dev_set_name is set on non failure cases, and releases memory in
case of failure.
Signed-off-by: Aditya Pakki
---
v1: Missed cleanup of svc in case of
In enumerate_services, ida_simple_get on failure can return an error and
leaks memory. The patch ensures that the dev_set_name is set on non
failure cases, and releases memory during failure.
Signed-off-by: Aditya Pakki
---
v2: Remove kfree in device_register failure
v1: Missed cleanup of svc
skb allocated via dev_alloc_skb can fail and return a NULL pointer.
This patch avoids such a scenario and returns, consistent with other
invocations.
Signed-off-by: Aditya Pakki
---
v2: Move signed off above the version change log
v1: Patch collision with rtl_phydm.c, fix as per Greg
hwxmits is allocated via kcalloc and not checked for failure before its
dereference. The patch fixes this problem by returning error upstream
in rtl8723bs, rtl8188eu.
Signed-off-by: Aditya Pakki
---
v2: Move signed off above version change log.
v1: Return error and remove print in case of
of_match_device can return NULL if no matching device is found.
This patch replaces the function with of_device_get_match_data.
and returns -EINVAL in such a scenario.
Signed-off-by: Aditya Pakki
---
v1: Replace of_match_device with of_device_get_match_data
---
drivers/firmware/arm_scmi
Unlike other drivers probe method, of_match_node return value
is not used or checked. This patch removes the redundant code.
Signed-off-by: Aditya Pakki
---
v2: Move the signed by above the version change log
v1: A check is unnecessary as match is never used.
---
sound/soc/codecs/sirf-audio
uuid in add_switch is allocted via kmemdup which can fail. The patch
logs the error and cleans up the allocated memory for switch.
Signed-off-by: Aditya Pakki
---
v1: Change error handling from WARN_ONCE to return after clean up.
---
drivers/thunderbolt/icm.c | 5 +
1 file changed, 5
In case __get_free_pages fail, the fix returns error upstream
to avoid NULL pointer dereference.
Signed-off-by: Aditya Pakki
---
v1: Return error upstream as suggested by Steven
---
drivers/pci/controller/pcie-xilinx.c | 11 +--
1 file changed, 9 insertions(+), 2 deletions(-)
diff
1 - 100 of 139 matches
Mail list logo