From patchwork Fri Jan 29 14:51:33 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Chaehyun Lim X-Patchwork-Id: 8164011 X-Patchwork-Delegate: johannes@sipsolutions.net Return-Path: X-Original-To: patchwork-linux-wireless@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork1.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork1.web.kernel.org (Postfix) with ESMTP id 609E89F440 for ; Fri, 29 Jan 2016 14:51:56 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 96DDA20383 for ; Fri, 29 Jan 2016 14:51:55 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 566892039D for ; Fri, 29 Jan 2016 14:51:54 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932112AbcA2Ovr (ORCPT ); Fri, 29 Jan 2016 09:51:47 -0500 Received: from mail-pf0-f195.google.com ([209.85.192.195]:34306 "EHLO mail-pf0-f195.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1756438AbcA2Ovo (ORCPT ); Fri, 29 Jan 2016 09:51:44 -0500 Received: by mail-pf0-f195.google.com with SMTP id 65so3888952pfd.1 for ; Fri, 29 Jan 2016 06:51:44 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=FBRFP9Y6XSljKRJpfzdcgGU/1VDGEMyQQOxP3ldDfCg=; b=Wfqh0wctnG3PdQ8MOVLrQR2LMxQxtTYIh81oIsDGodRL0Ao57w84TzhwgZXmxRHm/S aINPIBU+0krZxQZ00dpQ10+nooH/oal0k6ZHowt396D9rK1Bpl6cF5Eh+QjP3e42PELv xTpf/7NBr4+lb90Jz01tid3bXtA7YlZ8tiEy2Wtg8nrAA3d7S0uGJeMniGzIFQaaH0Xd nuWoQW5KPyk/lHHgbVxMNU5FVtIuokQtQD9cI0cR9HBKllaSoS+W/AW3RHhcItE2DZ5S Urg4ENmzuCXifyVG61B+yDmFtuh1d/rGILLmTRp6mcIhJON4AOat54YD6wJYW6JUUrQu EW8w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=FBRFP9Y6XSljKRJpfzdcgGU/1VDGEMyQQOxP3ldDfCg=; b=kwfFM4m3vemXNii7JjPDS0ZpGhB2NRb8PmWgAJlEA39ikoKrkzeK6PB5aD8QW5pkBh 6QLJDV+S7wMyvz5IpYZOG9zuy+UdcwUPE4ACqHuNQAr3ShTQoAiUHeRfFGqN20MMH620 nwzyGzwjIUDD5y0fvmUckE23gqyCLUyKdjqHoNPZk6n1fth9HJlk4PCgU7FjbIkDnDwo IL3C2C4Ofy7P0pZ2hhe68utFG5lIOwBTjWL/rPuWvc6sUqyK9XbKL+EfxEp40djqid6f zMAAI19k4dcTCUXdQO92B5xvXIlJN81qi7b6XTumgncqM28eIyP1qc3oZHn7qY60bZnr APBg== X-Gm-Message-State: AG10YOR74p9IL8pZkRTU3/OpVqskoC87noB5CnWDwyyG7A5UGFbfCkbL8otwWrYovLVRYg== X-Received: by 10.98.2.216 with SMTP id 207mr6048374pfc.3.1454079104284; Fri, 29 Jan 2016 06:51:44 -0800 (PST) Received: from localhost.localdomain ([218.233.16.2]) by smtp.gmail.com with ESMTPSA id dz12sm24230692pac.2.2016.01.29.06.51.41 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Fri, 29 Jan 2016 06:51:43 -0800 (PST) From: Chaehyun Lim To: gregkh@linuxfoundation.org Cc: johnny.kim@atmel.com, austin.shin@atmel.com, chris.park@atmel.com, tony.cho@atmel.com, glen.lee@atmel.com, leo.kim@atmel.com, linux-wireless@vger.kernel.org, devel@driverdev.osuosl.org, Chaehyun Lim Subject: [PATCH 2/2] staging: wilc1000: wilc_msgqueue: release semaphore in error path Date: Fri, 29 Jan 2016 23:51:33 +0900 Message-Id: <1454079093-7011-2-git-send-email-chaehyun.lim@gmail.com> X-Mailer: git-send-email 2.7.0 In-Reply-To: <1454079093-7011-1-git-send-email-chaehyun.lim@gmail.com> References: <1454079093-7011-1-git-send-email-chaehyun.lim@gmail.com> Sender: linux-wireless-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-wireless@vger.kernel.org X-Spam-Status: No, score=-6.8 required=5.0 tests=BAYES_00, DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED, FREEMAIL_FROM, RCVD_IN_DNSWL_HI, RP_MATCHES_RCVD, T_DKIM_INVALID, UNPARSEABLE_RELAY autolearn=ham version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP It should be called up(&mq->sem) to release semaphore before returning error codes as -EFAULT when list is empty. Signed-off-by: Chaehyun Lim --- drivers/staging/wilc1000/wilc_msgqueue.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/staging/wilc1000/wilc_msgqueue.c b/drivers/staging/wilc1000/wilc_msgqueue.c index f57e4ec..5fe85eb 100644 --- a/drivers/staging/wilc1000/wilc_msgqueue.c +++ b/drivers/staging/wilc1000/wilc_msgqueue.c @@ -126,6 +126,7 @@ int wilc_mq_recv(struct message_queue *mq, if (list_empty(&mq->msg_list)) { spin_unlock_irqrestore(&mq->lock, flags); + up(&mq->sem); PRINT_ER("msg is null\n"); return -EFAULT; }