From fc96e661a57d5e4de01503d460116cce7ced7e70 Mon Sep 17 00:00:00 2001 From: Dan Carpenter Date: Wed, 11 Jun 2014 13:17:41 +0300 Subject: misc: vexpress: fix error handling vexpress_syscfg_regmap_init() This function should be returning an ERR_PTR() on failure instead of NULL. Also there is a use after free bug if regmap_init() fails because we free "func" and then dereference doing the return. Signed-off-by: Dan Carpenter Acked-by: Pawel Moll Signed-off-by: Arnd Bergmann --- drivers/misc/vexpress-syscfg.c | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) (limited to 'drivers/misc') diff --git a/drivers/misc/vexpress-syscfg.c b/drivers/misc/vexpress-syscfg.c index 73068e50e56d..3250fc1df0aa 100644 --- a/drivers/misc/vexpress-syscfg.c +++ b/drivers/misc/vexpress-syscfg.c @@ -199,7 +199,7 @@ static struct regmap *vexpress_syscfg_regmap_init(struct device *dev, func = kzalloc(sizeof(*func) + sizeof(*func->template) * num, GFP_KERNEL); if (!func) - return NULL; + return ERR_PTR(-ENOMEM); func->syscfg = syscfg; func->num_templates = num; @@ -231,10 +231,14 @@ static struct regmap *vexpress_syscfg_regmap_init(struct device *dev, func->regmap = regmap_init(dev, NULL, func, &vexpress_syscfg_regmap_config); - if (IS_ERR(func->regmap)) + if (IS_ERR(func->regmap)) { + void *err = func->regmap; + kfree(func); - else - list_add(&func->list, &syscfg->funcs); + return err; + } + + list_add(&func->list, &syscfg->funcs); return func->regmap; } -- cgit v1.2.3 From 73b35d07ee20d6af95359fb86540528709dd58bb Mon Sep 17 00:00:00 2001 From: Dmitry Torokhov Date: Fri, 20 Jun 2014 10:14:58 -0700 Subject: MAINTAINERS: add entry for VMware Balloon driver Signed-off-by: Dmitry Torokhov Signed-off-by: Greg Kroah-Hartman --- MAINTAINERS | 8 ++++++++ drivers/misc/vmw_balloon.c | 3 ++- 2 files changed, 10 insertions(+), 1 deletion(-) (limited to 'drivers/misc') diff --git a/MAINTAINERS b/MAINTAINERS index 134483f206e4..8baf56df3d84 100644 --- a/MAINTAINERS +++ b/MAINTAINERS @@ -9743,6 +9743,14 @@ L: virtualization@lists.linux-foundation.org S: Supported F: arch/x86/kernel/cpu/vmware.c +VMWARE BALLOON DRIVER +M: Xavier Deguillard +M: Philip Moltmann +M: "VMware, Inc." +L: linux-kernel@vger.kernel.org +S: Maintained +F: drivers/misc/vmw_balloon.c + VMWARE VMXNET3 ETHERNET DRIVER M: Shreyas Bhatewara M: "VMware, Inc." diff --git a/drivers/misc/vmw_balloon.c b/drivers/misc/vmw_balloon.c index 2421835d5daf..191617492181 100644 --- a/drivers/misc/vmw_balloon.c +++ b/drivers/misc/vmw_balloon.c @@ -17,7 +17,8 @@ * along with this program; if not, write to the Free Software * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. * - * Maintained by: Dmitry Torokhov + * Maintained by: Xavier Deguillard + * Philip Moltmann */ /* -- cgit v1.2.3 From 8dcd598c74e9c449537ff48febed8104b680ad31 Mon Sep 17 00:00:00 2001 From: Nicolas Ferre Date: Wed, 25 Jun 2014 11:33:44 +0200 Subject: misc: atmel_pwm: fix Kconfig symbols AT91 symbols AT91SAM9263, AT91SAM9RL, and AT91SAM9G45 do not exist and this patch changes them to their correct ARCH_* version. These symbols are chosen instead of the SOC_* ones because this driver is not converted to DT. Anyway, the ATMEL_PWM symbol and the associated driver will be removed soon, during the move to the PWM sub-system. Reported-by: Paul Bolle Acked-by: Alexandre Belloni Signed-off-by: Nicolas Ferre --- drivers/misc/Kconfig | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'drivers/misc') diff --git a/drivers/misc/Kconfig b/drivers/misc/Kconfig index a43d0c467274..ee9402324a23 100644 --- a/drivers/misc/Kconfig +++ b/drivers/misc/Kconfig @@ -54,7 +54,7 @@ config AD525X_DPOT_SPI config ATMEL_PWM tristate "Atmel AT32/AT91 PWM support" depends on HAVE_CLK - depends on AVR32 || AT91SAM9263 || AT91SAM9RL || AT91SAM9G45 + depends on AVR32 || ARCH_AT91SAM9263 || ARCH_AT91SAM9RL || ARCH_AT91SAM9G45 help This option enables device driver support for the PWM channels on certain Atmel processors. Pulse Width Modulation is used for -- cgit v1.2.3