Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753429AbcDOIWk (ORCPT ); Fri, 15 Apr 2016 04:22:40 -0400 Received: from hotel311.server4you.de ([85.25.146.15]:52955 "EHLO hotel311.server4you.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753338AbcDOIWh (ORCPT ); Fri, 15 Apr 2016 04:22:37 -0400 From: Daniel Wagner To: linux-kernel@vger.kernel.org Cc: Daniel Wagner , Pavan Savoy , Greg Kroah-Hartman Subject: [PATCH] ti-st: Fix complete_all() wrong usage Date: Fri, 15 Apr 2016 10:22:27 +0200 Message-Id: <1460708547-17498-1-git-send-email-wagi@monom.org> X-Mailer: git-send-email 2.5.5 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1193 Lines: 38 From: Daniel Wagner complete_all() should only be called once, doing it twice is a clear bug. 8565adbc8214 ("drivers/misc/ti-st: fix read fw version cmd") added the additional complete_all() call. Since we call complete_all() when leaving the function we can drop the complete_all() call inside true branch of the if statement. Signed-off-by: Daniel Wagner Cc: Pavan Savoy Cc: Greg Kroah-Hartman --- Hi, I found this one when looking though all the complete_all() users. It is only compile tested. cheers, daniel drivers/misc/ti-st/st_kim.c | 1 - 1 file changed, 1 deletion(-) diff --git a/drivers/misc/ti-st/st_kim.c b/drivers/misc/ti-st/st_kim.c index 71b6455..bf0d770 100644 --- a/drivers/misc/ti-st/st_kim.c +++ b/drivers/misc/ti-st/st_kim.c @@ -78,7 +78,6 @@ static void validate_firmware_response(struct kim_data_s *kim_gdata) memcpy(kim_gdata->resp_buffer, kim_gdata->rx_skb->data, kim_gdata->rx_skb->len); - complete_all(&kim_gdata->kim_rcvd); kim_gdata->rx_state = ST_W4_PACKET_TYPE; kim_gdata->rx_skb = NULL; kim_gdata->rx_count = 0; -- 2.5.5