Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1759261AbbLBRP7 (ORCPT ); Wed, 2 Dec 2015 12:15:59 -0500 Received: from youngberry.canonical.com ([91.189.89.112]:43963 "EHLO youngberry.canonical.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S933316AbbLBRBu (ORCPT ); Wed, 2 Dec 2015 12:01:50 -0500 From: Kamal Mostafa To: linux-kernel@vger.kernel.org, stable@vger.kernel.org, kernel-team@lists.ubuntu.com Cc: Geliang Tang , Sebastian Reichel , Kamal Mostafa Subject: [PATCH 3.19.y-ckt 133/164] hsi: fix double kfree Date: Wed, 2 Dec 2015 08:59:44 -0800 Message-Id: <1449075615-20754-134-git-send-email-kamal@canonical.com> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1449075615-20754-1-git-send-email-kamal@canonical.com> References: <1449075615-20754-1-git-send-email-kamal@canonical.com> X-Extended-Stable: 3.19 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1241 Lines: 39 3.19.8-ckt11 -stable review patch. If anyone has any objections, please let me know. ------------------ From: Geliang Tang commit f098a045350ecd6045f2f2d5a50fecf2a98962d7 upstream. When device_register() fails, kfree() is called in hsi_client_release(), hence there is no need to call kfree in err3 again. Fixes: a2aa24734d9db ("HSI: Add common DT binding for HSI client devices") Signed-off-by: Geliang Tang Signed-off-by: Sebastian Reichel Signed-off-by: Kamal Mostafa --- drivers/hsi/hsi.c | 1 - 1 file changed, 1 deletion(-) diff --git a/drivers/hsi/hsi.c b/drivers/hsi/hsi.c index fe93712..35d631e 100644 --- a/drivers/hsi/hsi.c +++ b/drivers/hsi/hsi.c @@ -300,7 +300,6 @@ static void hsi_add_client_from_dt(struct hsi_port *port, if (device_register(&cl->device) < 0) { pr_err("hsi: failed to register client: %s\n", name); put_device(&cl->device); - goto err3; } return; -- 1.9.1 -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/