In function rt5033_battery_get_present(), variable "val" could be
uninitialized if regmap_read() returns -EINVAL. However, "val" is
used to decide the return value, which is potentially unsafe.
Signed-off-by: Yizhuo
---
drivers/power/supply/rt5033_battery.c | 8 +++
Hi Sebastian:
Thanks for your explanation and I will send the patch accordingly.
On Sun, Oct 13, 2019 at 8:12 PM Sebastian Reichel wrote:
>
> Hi,
>
> On Thu, Oct 03, 2019 at 09:21:44PM -0700, Yizhuo Zhai wrote:
> > drivers/power/supply/rt5033_battery.c:
&
tions.
On Wed, Oct 9, 2019 at 10:48 PM Eric Dumazet wrote:
>
>
>
> On 10/9/19 10:37 PM, Yizhuo Zhai wrote:
> > Hi All:
> >
> > drivers/spi/spi.c:
> >
> > The function to_spi_device() could return NULL, but some callers
> > in this file does not che
Sorry about that, let me resend it .
On Thu, Oct 10, 2019 at 2:53 AM Dan Carpenter wrote:
>
> On Wed, Oct 09, 2019 at 09:38:08PM -0700, Yizhuo wrote:
> > Inside function set_chip_clock(), struct pll is supposed to be
> > initialized in sm750_calc_pll_value(), if condition
>
.
--
Kind Regards,
Yizhuo Zhai
Computer Science, Graduate Student
University of California, Riverside
Hi All:
In function sata_rcar_bmdma_fill_sg, macro for_each_sg uses sg_next(),
which could return NULL as "sg", however, there's no check before
dereferencing it (in sg_dma_address()), which is potentially unsafe.
--
Kind Regards,
Yizhuo Zhai
Computer Science, Graduate Studen
(),
iwl_mvm_power_configure_uapsd(),
iwl_mvm_power_allow_uapsd(), etc.
--
Kind Regards,
Yizhuo Zhai
Computer Science, Graduate Student
University of California, Riverside
(),
mem_cgroup_reset(), etc.
--
Kind Regards,
Yizhuo Zhai
Computer Science, Graduate Student
University of California, Riverside
,
Yizhuo Zhai
Computer Science, Graduate Student
University of California, Riverside
s potentially unsafe.
Signed-off-by: Yizhuo
---
drivers/staging/sm750fb/ddk750_chip.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/staging/sm750fb/ddk750_chip.c
b/drivers/staging/sm750fb/ddk750_chip.c
index 5a317cc98a4b..31b3cf9c2d8b 100644
--- a/drivers/st
Inside function o2hb_region_blocks_store(), to_o2hb_region()
could return NULL but there's no check before its dereference,
which is potentially unsafe.
Signed-off-by: Yizhuo
---
fs/ocfs2/cluster/heartbeat.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/fs/ocfs2/cl
Inside function usb_device_is_owned(), usb_hub_to_struct_hub()
could return NULL but there's no check before its dereference,
which is potentially unsafe.
Signed-off-by: Yizhuo
---
drivers/usb/core/hub.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/usb/core/
his case is not easy since the error return is not an
acceptable return value for axi_clkgen_recalc_rate().
--
Kind Regards,
Yizhuo Zhai
Computer Science, Graduate Student
University of California, Riverside
urn value -EINVAL is unacceptable
for ds1343_show_glitchfilter().
--
Kind Regards,
Yizhuo Zhai
Computer Science, Graduate Student
University of California, Riverside
ontrol flow, which is potentially unsafe.
The patch is hard since we do not know the correct value to initialize them.
--
Kind Regards,
Yizhuo Zhai
Computer Science, Graduate Student
University of California, Riverside
Inside function hpet_msi_resume(), variable "msg" could be
uninitialized if irq_chip_compose_msi_msg() returns -ENOSYS.
However, it is directly used in hpet_msi_write(), which is
potentially unsafe.
Signed-off-by: Yizhuo
---
arch/x86/kernel/hpet.c | 1 +
1 file changed, 1 insertio
Hi All:
net/sched/sch_mq.c:
Inside function mq_dump_class(), mq_queue_get() could return NULL,
however, the return value of dev_queue is not checked and get used.
This could potentially be unsafe.
--
Kind Regards,
Yizhuo Zhai
Computer Science, Graduate Student
University of California
Hi All:
drivers/sfi/sfi_core.c:
Inside function sfi_map_table(), sfi_map_memory() could return NULL,
however, the return value of sfi_map_memory() is not checked and get
used. This could potentially be unsafe.
--
Kind Regards,
Yizhuo Zhai
Computer Science, Graduate Student
University of
Hi All:
drivers/scsi/scsi.c:
Inside function __starget_for_each_device(), dev_to_shost()
could return NULL,however, the return value shost is not
checked and get used. This could potentially be unsafe.
--
Kind Regards,
Yizhuo Zhai
Computer Science, Graduate Student
University of California
Hi All:
drivers/scsi/scsi_transport_spi.c:
Inside function store_spi_transport_period(), dev_to_shost()
could return NULL, however, the return value shost is not
checked and get used. This could potentially be unsafe.
--
Kind Regards,
Yizhuo Zhai
Computer Science, Graduate Student
University
Inside function sas_rphy_match(), dev_to_shost() could return NULL,
however, the return value of dev_to_shost() is not checked and
get used. This could potentially be unsafe.
Signed-off-by: Yizhuo
---
drivers/scsi/scsi_transport_sas.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a
,
Yizhuo Zhai
Computer Science, Graduate Student
University of California, Riverside
,
Yizhuo Zhai
Computer Science, Graduate Student
University of California, Riverside
Hi All:
drivers/target/iscsi/cxgbit/cxgbit_ddp.c:
Inside function cxgbit_ddp_sgl_check(), sg_next() could return NULL,
however, the return value of sg_next() is not checked and get
dereferenced. This could potentially be unsafe.
--
Kind Regards,
Yizhuo Zhai
Computer Science, Graduate Student
"lpsr" and function snvs_rtc_read_alarm() with variables
"lptar", "lpsr". The patch for those two are not easy since
-EINVAL is not an acceptable return value for these functions.
Signed-off-by: Yizhuo
---
drivers/rtc/rtc-snvs.c | 6 +-
1 file changed, 5 insertions(+), 1 deletion
cause
the error code is out of the return type: irqreturn_t.
Thanks for your time to check this case.
--
Kind Regards,
Yizhuo Zhai
Computer Science, Graduate Student
University of California, Riverside
simply return -EINVAL in stm32_pwm_lp_get_state() because the
return type is void.
Thanks for your time to check this case.
--
Kind Regards,
Yizhuo Zhai
Computer Science, Graduate Student
University of California, Riverside
tect_channels()
with variable "ccer", but we cannot just return -EINVAL because
the error code is not acceptable by the caller. Aslo, the variable
"ccer" in functionstm32_pwm_detect_complementary() could also be
uninitialized, since stm32_pwm_detect_complementary() returns void,
the p
ly return -EINVAL in rt5033_battery_get_present()
because it's not an acceptable return value.
Thanks for your time to check this case.
--
Kind Regards,
Yizhuo Zhai
Computer Science, Graduate Student
University of California, Riverside
L in hip04_reset_ppe() because
the return type is void.
Thanks for your time to check this case.
--
Kind Regards,
Yizhuo Zhai
Computer Science, Graduate Student
University of California, Riverside
Inside function max8907_regulator_probe(), variable val could
be uninitialized if regmap_read() fails. However, val is used
later in the if statement to decide the content written to
"pmic", which is potentially unsafe.
Signed-off-by: Yizhuo
---
drivers/regulator/max8907-regula
at 2:22 PM David Miller wrote:
>
> From: Yizhuo
> Date: Tue, 1 Oct 2019 13:24:39 -0700
>
> > In function mdio_sc_cfg_reg_write(), variable "reg_value" could be
> > uninitialized if regmap_read() fails. However, "reg_value" is used
> > to decide the cont
also happens in function
max17042_thread_handler() but it needs more effort to patch.
Signed-off-by: Yizhuo
---
drivers/power/supply/max17042_battery.c | 23 +++
1 file changed, 19 insertions(+), 4 deletions(-)
diff --git a/drivers/power/supply/max17042_battery.c
b/drivers
also happens in function
max17042_thread_handler() but it needs more effort to patch.
Signed-off-by: Yizhuo
---
drivers/power/supply/max17042_battery.c | 23 +++
1 file changed, 19 insertions(+), 4 deletions(-)
diff --git a/drivers/power/supply/max17042_battery.c
b/drivers
In function max17042_write_verify_reg(), variable "read_value"
could be uninitialized if regmap_read() fails. However,
"read_value" is used to decide the control flow later in the if
statement, which is potentially unsafe.
Signed-off-by: Yizhuo
---
drivers/power/supply/ma
In function mdio_sc_cfg_reg_write(), variable "reg_value" could be
uninitialized if regmap_read() fails. However, "reg_value" is used
to decide the control flow later in the if statement, which is
potentially unsafe.
Signed-off-by: Yizhuo
---
drivers/net/ethernet/hisi
e same file.
Signed-off-by: Yizhuo
---
drivers/iio/adc/fsl-imx25-gcq.c | 13 +++--
1 file changed, 11 insertions(+), 2 deletions(-)
diff --git a/drivers/iio/adc/fsl-imx25-gcq.c b/drivers/iio/adc/fsl-imx25-gcq.c
index fa71489195c6..3b1e12b7c1ac 100644
--- a/drivers/iio/adc/fsl-imx25-gcq
most of the uninitialized
variables, but those in function stm32_tt_read_frequency() are
hard to handle and need extra effot.
Signed-off-by: Yizhuo
---
drivers/iio/trigger/stm32-timer-trigger.c | 98 ---
1 file changed, 85 insertions(+), 13 deletions(-)
diff --git a/drivers
: Yizhuo
---
drivers/iio/adc/bcm_iproc_adc.c | 45 -
1 file changed, 39 insertions(+), 6 deletions(-)
diff --git a/drivers/iio/adc/bcm_iproc_adc.c b/drivers/iio/adc/bcm_iproc_adc.c
index 646ebdc0a8b4..6df19ceb5ff2 100644
--- a/drivers/iio/adc/bcm_iproc_adc.c
+++ b
In function pfuze100_regulator_probe(), variable "val" could be
initialized if regmap_read() fails. However, "val" is used to
decide the control flow later in the if statement, which is
potentially unsafe.
Signed-off-by: Yizhuo
---
drivers/regulator/pfuze100-regulator.c
Guire wrote:
>
> On Fri, Sep 27, 2019 at 05:46:41PM -0700, Yizhuo wrote:
> > Several functions in this file are trying to use regmap_read() to
> > initialize the specific variable, however, if regmap_read() fails,
> > the variable could be uninitialized but used directly,
: Yizhuo
---
drivers/iio/adc/meson_saradc.c | 30 --
1 file changed, 24 insertions(+), 6 deletions(-)
diff --git a/drivers/iio/adc/meson_saradc.c b/drivers/iio/adc/meson_saradc.c
index 7b28d045d271..4b6c2983ef39 100644
--- a/drivers/iio/adc/meson_saradc.c
+++ b/drivers
: Yizhuo
---
drivers/iio/adc/meson_saradc.c | 28 +++-
1 file changed, 23 insertions(+), 5 deletions(-)
diff --git a/drivers/iio/adc/meson_saradc.c b/drivers/iio/adc/meson_saradc.c
index 7b28d045d271..c032a64108b4 100644
--- a/drivers/iio/adc/meson_saradc.c
+++ b/drivers/iio
e same file.
Signed-off-by: Yizhuo
---
drivers/iio/adc/fsl-imx25-gcq.c | 10 --
1 file changed, 8 insertions(+), 2 deletions(-)
diff --git a/drivers/iio/adc/fsl-imx25-gcq.c b/drivers/iio/adc/fsl-imx25-gcq.c
index df19ecae52f7..dbf3e8e85aba 100644
--- a/drivers/iio/adc/fsl-imx25-gcq.c
+
e.
Signed-off-by: Yizhuo
---
drivers/staging/rtl8723bs/os_dep/ioctl_cfg80211.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/staging/rtl8723bs/os_dep/ioctl_cfg80211.c
b/drivers/staging/rtl8723bs/os_dep/ioctl_cfg80211.c
index 9bc685632651..dd39a581b7ef 100644
---
Thanks Mark, I will send a new patch and check the return value instead.
On Tue, Sep 3, 2019 at 4:26 AM Mark Brown wrote:
>
> On Mon, Sep 02, 2019 at 03:10:47PM -0700, Yizhuo wrote:
> > In function pfuze100_regulator_probe(), variable "val" could be
> > initia
and return error code if "val" is not
initialized. The caller remap_read() returns the same error code, but
at91rm9200_timer_interrupt() does not use this information.
On Mon, Sep 2, 2019 at 3:37 PM Alexandre Belloni
wrote:
>
> On 02/09/2019 15:29:46-0700, Yizhuo wrote:
> > Inside fun
Thanks Andy, sorry for the inconvenience, I will check the log more
carefully next time.
On Mon, Sep 2, 2019 at 3:48 PM Andy Shevchenko
wrote:
>
>
>
> On Tuesday, September 3, 2019, Yizhuo wrote:
>>
>> In function axp288_extcon_log_rsi(), variable "val" could
Sorry for the inconvenience. I made some mistake here, please ignore
this patch and I will submit a new one.
On Mon, Sep 2, 2019 at 4:14 PM Yizhuo wrote:
>
> In function mdio_sc_cfg_reg_write(), variable reg_value could be
> uninitialized if regmap_read() fails. However, this variable
In function mdio_sc_cfg_reg_write(), variable reg_value could be
uninitialized if regmap_read() fails. However, this variable is
used later in the if statement, which is potentially unsafe.
Signed-off-by: Yizhuo
---
drivers/net/ethernet/hisilicon/hns_mdio.c | 8 +++-
1 file changed, 7
In function axp288_extcon_log_rsi(), variable "val" could be
uninitialized if regmap_read() fails. However, it's ued to
decide the control flow later in the if statement, which is
potentially unsafe.
Signed-off-by: Yizhuo
---
drivers/extcon/extcon-axp288.c | 5 +
1
: Yizhuo
---
drivers/clocksource/timer-atmel-st.c | 8 +++-
1 file changed, 7 insertions(+), 1 deletion(-)
diff --git a/drivers/clocksource/timer-atmel-st.c
b/drivers/clocksource/timer-atmel-st.c
index ab0aabfae5f0..061a3f27847e 100644
--- a/drivers/clocksource/timer-atmel-st.c
+++ b/drivers
In function pfuze100_regulator_probe(), variable "val" could be
initialized if regmap_read() fails. However, "val" is used to
decide the control flow later in the if statement, which is
potentially unsafe.
Signed-off-by: Yizhuo
---
drivers/regulator/pfuze100-regulator.c |
In function ec_read_u8(), variable "value" could be uninitialized
if ec_read() fails. However, "value" is returned directly and used
in its callers. This is potentially unsafe.
Signed-off-by: Yizhuo
---
drivers/platform/x86/compal-laptop.c | 2 +-
1 file changed, 1 inse
In function sun8i_dwmac_set_syscon(), local variable "val" could
be uninitialized if function regmap_field_read() returns -EINVAL.
However, it will be used directly in the if statement, which
is potentially unsafe.
Signed-off-by: Yizhuo
---
drivers/net/ethernet/stmicro/stmmac/dwmac-s
Hi David:
Thanks for your feedback, this patch should work for v4.14.
On Fri, Feb 8, 2019 at 11:01 PM David Miller wrote:
>
> From: Yizhuo
> Date: Thu, 7 Feb 2019 09:46:23 -0800
>
> > In function sun8i_dwmac_set_syscon(), local variable "val" could
>
Our tool did not trace back the whole path, so, now we could say it
might happen.
On Thu, Aug 22, 2019 at 1:12 PM Michal Hocko wrote:
>
> On Thu 22-08-19 13:07:17, Yizhuo Zhai wrote:
> > This will happen if variable "wb->memcg_css" is NULL. This case is reported
Inside function cz_get_performance_level(), pointer ps could be NULL via
cast_const_PhwCzPowerState(). However, this pointer is dereferenced
without any check, which is potentially unsafe.
Signed-off-by: Yizhuo
---
drivers/gpu/drm/amd/powerplay/hwmgr/cz_hwmgr.c | 3 +++
1 file changed, 3
Inside function compress_sliced_buf(), variable vbi.type is
uninitialized if macro v4l2_subdev_call set __result an
error code. However, vbi.type is used in the if statement
without any check, which is potentially unsafe.
Signed-off-by: Yizhuo
---
drivers/media/pci/ivtv/ivtv-vbi.c | 2 +-
1
Inside function nrcpus(), variable nr_cpus is uninitialized if
get_option() returns 0. However, the value will be used in the
if statement, which is potentially unsafe.
Signed-off-by: Yizhuo
---
kernel/smp.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/kernel/smp.c b
Inside function adfs_dir_find_entry(), obj.file_id could be uninitialized
if __adfs_dir_get() returns error code. However, the return check cannot
promise the initialization of obj.file_id, which is used in the if
statement. This is potentially unsafe.
Signed-off-by: Yizhuo
---
fs/adfs/dir_f.c
Inside function ctrl_cx2341x_getv4lflags(), qctrl.flag
will be uninitlaized if cx2341x_ctrl_query() returns -EINVAL.
However, it will be used in the later if statement, which is
potentially unsafe.
Signed-off-by: Yizhuo
---
drivers/media/usb/pvrusb2/pvrusb2-hdw.c | 2 +-
1 file changed, 1
Thanks for the correction, let me send a new patch then.
On Mon, Aug 26, 2019 at 5:09 AM Hans Verkuil wrote:
>
> On 8/21/19 11:09 PM, Yizhuo wrote:
> > Inside function ctrl_cx2341x_getv4lflags(), qctrl.flag
> > will be uninitlaized if cx2341x_ctrl_query() returns -EINVAL.
>
Inside function mem_cgroup_wb_domain(), the pointer memcg
could be NULL via mem_cgroup_from_css(). However, this pointer is
not checked and directly dereferenced in the if statement,
which is potentially unsafe.
Signed-off-by: Yizhuo
---
mm/memcontrol.c | 2 +-
1 file changed, 1 insertion(+), 1
Inside function ctrl_cx2341x_getv4lflags(), qctrl.flag
will be uninitlaized if cx2341x_ctrl_query() returns -EINVAL.
However, it will be used in the later if statement, which is
potentially unsafe.
Signed-off-by: Yizhuo
---
drivers/media/usb/pvrusb2/pvrusb2-hdw.c | 1 +
1 file changed, 1
Make sense, I will send the new patch. Thanks for the opinion.
On Thu, Feb 7, 2019 at 1:25 AM Maxime Ripard wrote:
>
> On Wed, Feb 06, 2019 at 09:53:16PM -0800, Yizhuo Zhai wrote:
> >
> >
> > On Wed, Feb 6, 2019 at 9:52 PM Yizhuo Zhai wrote:
> > >
> > &
In function sun8i_dwmac_set_syscon(), local variable "val" could
be uninitialized if function regmap_read() returns -EINVAL.
However, it will be used directly in the if statement, which
is potentially unsafe.
Signed-off-by: Yizhuo
---
drivers/net/ethernet/stmicro/stmmac/dwmac-s
Thanks, but why initialization matters here? Is performance the main concern?
On Wed, Feb 6, 2019 at 9:52 PM Yizhuo Zhai wrote:
>
> Thanks, but why initialization matters here? Is performance the main concern?
>
> On Wed, Feb 6, 2019 at 8:17 PM David Miller wrote:
>>
>&g
In function miphy_osc_is_ready(), local variable "val"
could be uninitalized. if function regmap_read() returns
-EINVAL. However, this value is used in if statement.
This is potentially unsafe.
Signed-off-by: Yizhuo
---
drivers/phy/st/phy-miphy28lp.c | 7 +--
1 file changed, 5
In function miphy_osc_is_ready(), local variable "val"
could be uninitalized. if function regmap_read() returns
-EINVAL. However, this value is used in if statement.
This is potentially unsafe.
Signed-off-by: Yizhuo
---
drivers/phy/st/phy-miphy28lp.c | 7 +--
1 file changed, 5
In function rockchip_usb3_phy_power_on(), local variable
"val" could be uninitialized if function regmap_read()
returns -EINVAL. However, this value is directly used in
later context. This is potentially unsafe.
Signed-off-by: Yizhuo
---
drivers/phy/rockchip/phy-rockchip-typec.c |
In function rockchip_emmc_phy_power(), local variable "caldone"
could be uninitialized if function regmap_read() returns -EINVAL.
However, it will be used directly in the later context, which
is potentially unsafe.
Signed-off-by: Yizhuo
---
drivers/phy/rockchip/phy-rockchip-e
In function pistachio_usb_phy_power_on(), local variable "val"
could be uninitialized if function regmap_read() returns -EINVAL.
However, it will be used directly in the if statement, which
is potentially unsafe.
Signed-off-by: Yizhuo
---
drivers/phy/phy-pistachio-usb.c | 8 ++
In function sun8i_dwmac_set_syscon(), local variable "val" could
be uninitialized if function regmap_read() returns -EINVAL.
However, it will be used directly in the if statement, which
is potentially unsafe.
Signed-off-by: Yizhuo
---
drivers/net/ethernet/stmicro/stmmac/dwmac-s
In function ts2020_set_tuner_rf(), local variable "utmp" could
be uninitialized if function regmap_read() returns -EINVAL.
However, this value is used in if statement and written to
the register, which is potentially unsafe.
Signed-off-by: Yizhuo
---
drivers/media/dvb-frontends/ts
In function ipu_prg_get_pre(), local variable "val" could
be uninitialized if function regmap_read() returns -EINVAL.
However, this value is used in if statement. This is
potentially unsafe.
Signed-off-by: Yizhuo
---
drivers/gpu/ipu-v3/ipu-prg.c | 8 +++-
1 file changed, 7 insert
In function gsc_set_gscblk_fimd_wb(), local variable "gscblk_cfg"
could be uninitialized of function regmap_read returns -EINVAL.
However, this value will be write to the register after "or"
operation. This is potentially unsafe.
Signed-off-by: Yizhuo
---
dr
In function gemini_clk_probe(), local variable "val" could
be uninitialized if function regmap_read() returns -EINVAL.
However, it will be used as index in the later context, which
could potentially be unsafe.
Signed-off-by: Yizhuo
---
drivers/clk/clk-gemini.c | 10 --
1 file
In function omap4_dsi_mux_pads(), local variable "reg" could
be uninitialized if function regmap_read() returns -EINVAL.
However, it will be used directly in the later context, which
is potentially unsafe.
Signed-off-by: Yizhuo
---
arch/arm/mach-omap2/display.c | 7 ++-
1 file
In function rt5651_i2c_probe(), local variable "ret" could
be uninitialized if function regmap_read() returns -EINVAL.
However, this value is used in if statement. This is
potentially unsafe.
Signed-off-by: Yizhuo
---
sound/soc/codecs/rt5651.c | 6 +-
1 file changed, 5 insert
ntially unsafe.
Signed-off-by: Yizhuo
---
sound/soc/codecs/rt274.c | 11 +--
1 file changed, 9 insertions(+), 2 deletions(-)
diff --git a/sound/soc/codecs/rt274.c b/sound/soc/codecs/rt274.c
index 8f92e5c4dd9d..332a3e955bdb 100644
--- a/sound/soc/codecs/rt274.c
+++ b/sound/soc/codecs/rt274.c
@
ld lead to undefined behavior and thus unsafe.
Signed-off-by: Yizhuo
---
sound/soc/codecs/rt298.c | 24 ++--
1 file changed, 18 insertions(+), 6 deletions(-)
diff --git a/sound/soc/codecs/rt298.c b/sound/soc/codecs/rt298.c
index ce963768449f..7f74349c17f3 100644
--- a/sound/soc/
ntially unsafe.
Signed-off-by: Yizhuo
---
sound/soc/codecs/rt274.c | 11 +--
1 file changed, 9 insertions(+), 2 deletions(-)
diff --git a/sound/soc/codecs/rt274.c b/sound/soc/codecs/rt274.c
index cd048df76232..a2c1a6df8df6 100644
--- a/sound/soc/codecs/rt274.c
+++ b/sound/soc/codecs/rt274.c
@
Inside function rt274_i2c_probe(), if regmap_read() function
returns -EINVAL, then local variable "val" leaves uninitialized
but used in if statement. This is potentially unsafe.
Signed-off-by: Yizhuo
---
sound/soc/codecs/rt274.c | 5 -
1 file changed, 4 insertions(+), 1 deletio
Signed-off-by: Yizhuo
---
sound/soc/codecs/rt274.c | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/sound/soc/codecs/rt274.c b/sound/soc/codecs/rt274.c
index 8f92e5c4dd9d..940658cac063 100644
--- a/sound/soc/codecs/rt274.c
+++ b/sound/soc/codecs/rt274.c
@@ -1113,7
85 matches
Mail list logo