From: Greg Kroah-Hartman Date: Sun, 28 May 2023 16:56:16 +0000 (+0100) Subject: 4.14-stable patches X-Git-Tag: review~8 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=965f2784d88d05ef12b2093ed44bd35ad3e97a02;p=thirdparty%2Fkernel%2Fstable-queue.git 4.14-stable patches added patches: 3c589_cs-fix-an-error-handling-path-in-tc589_probe.patch --- diff --git a/queue-4.14/3c589_cs-fix-an-error-handling-path-in-tc589_probe.patch b/queue-4.14/3c589_cs-fix-an-error-handling-path-in-tc589_probe.patch new file mode 100644 index 00000000000..593b0fd05da --- /dev/null +++ b/queue-4.14/3c589_cs-fix-an-error-handling-path-in-tc589_probe.patch @@ -0,0 +1,49 @@ +From 640bf95b2c7c2981fb471acdafbd3e0458f8390d Mon Sep 17 00:00:00 2001 +From: Christophe JAILLET +Date: Sat, 20 May 2023 11:48:55 +0200 +Subject: 3c589_cs: Fix an error handling path in tc589_probe() + +From: Christophe JAILLET + +commit 640bf95b2c7c2981fb471acdafbd3e0458f8390d upstream. + +Should tc589_config() fail, some resources need to be released as already +done in the remove function. + +Fixes: 15b99ac17295 ("[PATCH] pcmcia: add return value to _config() functions") +Signed-off-by: Christophe JAILLET +Reviewed-by: Simon Horman +Link: https://lore.kernel.org/r/d8593ae867b24c79063646e36f9b18b0790107cb.1684575975.git.christophe.jaillet@wanadoo.fr +Signed-off-by: Jakub Kicinski +Signed-off-by: Greg Kroah-Hartman +--- + drivers/net/ethernet/3com/3c589_cs.c | 11 ++++++++++- + 1 file changed, 10 insertions(+), 1 deletion(-) + +--- a/drivers/net/ethernet/3com/3c589_cs.c ++++ b/drivers/net/ethernet/3com/3c589_cs.c +@@ -196,6 +196,7 @@ static int tc589_probe(struct pcmcia_dev + { + struct el3_private *lp; + struct net_device *dev; ++ int ret; + + dev_dbg(&link->dev, "3c589_attach()\n"); + +@@ -219,7 +220,15 @@ static int tc589_probe(struct pcmcia_dev + + dev->ethtool_ops = &netdev_ethtool_ops; + +- return tc589_config(link); ++ ret = tc589_config(link); ++ if (ret) ++ goto err_free_netdev; ++ ++ return 0; ++ ++err_free_netdev: ++ free_netdev(dev); ++ return ret; + } + + static void tc589_detach(struct pcmcia_device *link) diff --git a/queue-4.14/series b/queue-4.14/series index 2fae2392689..2e3f69635aa 100644 --- a/queue-4.14/series +++ b/queue-4.14/series @@ -83,3 +83,4 @@ power-supply-sbs-charger-fix-inhibited-bit-for-status-reg.patch xen-pvcalls-back-fix-double-frees-with-pvcalls_new_active_socket.patch x86-show_trace_log_lvl-ensure-stack-pointer-is-aligned-again.patch forcedeth-fix-an-error-handling-path-in-nv_probe.patch +3c589_cs-fix-an-error-handling-path-in-tc589_probe.patch