mirror of
https://gitlab.com/etherlab.org/ethercat.git
synced 2026-08-20 21:51:25 +08:00
Enable -Wmaybe-uninitialised; Fixed uninitialized kfree().
This commit is contained in:
+3
-1
@@ -1,6 +1,6 @@
|
||||
#-----------------------------------------------------------------------------
|
||||
#
|
||||
# Copyright (C) 2006-2012 Florian Pose, Ingenieurgemeinschaft IgH
|
||||
# Copyright (C) 2006-2024 Florian Pose, Ingenieurgemeinschaft IgH
|
||||
#
|
||||
# This file is part of the IgH EtherCAT Master.
|
||||
#
|
||||
@@ -107,4 +107,6 @@ REV := $(shell if test -s $(src)/../revision; then \
|
||||
|
||||
CFLAGS_module.o := -DREV=$(REV)
|
||||
|
||||
KBUILD_CFLAGS += -Wmaybe-uninitialized
|
||||
|
||||
#-----------------------------------------------------------------------------
|
||||
|
||||
@@ -3386,7 +3386,6 @@ static ATTRIBUTES int ec_ioctl_sc_ip(
|
||||
{
|
||||
ec_ioctl_eoe_ip_t io;
|
||||
ec_slave_config_t *sc;
|
||||
uint8_t *key;
|
||||
|
||||
if (unlikely(!ctx->requested)) {
|
||||
return -EPERM;
|
||||
@@ -3397,13 +3396,11 @@ static ATTRIBUTES int ec_ioctl_sc_ip(
|
||||
}
|
||||
|
||||
if (down_interruptible(&master->master_sem)) {
|
||||
kfree(key);
|
||||
return -EINTR;
|
||||
}
|
||||
|
||||
if (!(sc = ec_master_get_config(master, io.config_index))) {
|
||||
up(&master->master_sem);
|
||||
kfree(key);
|
||||
return -ENOENT;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user