From patchwork Mon Mar 19 14:43:01 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Dan Carpenter X-Patchwork-Id: 10292473 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id E2DA0602C2 for ; Mon, 19 Mar 2018 14:43:24 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id CEA6A2811A for ; Mon, 19 Mar 2018 14:43:24 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id C30D8293BD; Mon, 19 Mar 2018 14:43:24 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-6.8 required=2.0 tests=BAYES_00,DKIM_SIGNED, RCVD_IN_DNSWL_HI, T_DKIM_INVALID, UNPARSEABLE_RELAY autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 46C302811A for ; Mon, 19 Mar 2018 14:43:24 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932300AbeCSOnR (ORCPT ); Mon, 19 Mar 2018 10:43:17 -0400 Received: from userp2130.oracle.com ([156.151.31.86]:41696 "EHLO userp2130.oracle.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1755678AbeCSOnP (ORCPT ); Mon, 19 Mar 2018 10:43:15 -0400 Received: from pps.filterd (userp2130.oracle.com [127.0.0.1]) by userp2130.oracle.com (8.16.0.22/8.16.0.22) with SMTP id w2JEgdhw159077; Mon, 19 Mar 2018 14:43:11 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oracle.com; h=date : from : to : cc : subject : message-id : mime-version : content-type; s=corp-2017-10-26; bh=3lOnI4qLMZAcBYzDmnMTgKg2eethLfGZqySZAT1X0oY=; b=P99MF9jvQ4SIoPiyYsVR0n8xk2Pkcsdpd+DDHq4vaqwzcQUmg6U/mjm4ZLEpDn51wnv9 3T1RWwegwzPkRTjg6cqp5WPXKBi00ORJKNLYoBRW98CXGnpYasxKuffit9v3hMBpDRUJ Xcf3Inp3PzrSfpIw5sMJumKVKdfgZaI9C2h8U0ZxbmV4CXDx/iFAMcl9IA32nsHiwwoo lrkZR/N4HOg0Uiku5wsigQmAZoV8JLgKIUF25iPR8pj7zMu9VxydZlxNFg+JlPrbk/Qk b+gB+71/GtzmYi/1ZFRYwiBybhq7tQ5EpnGl1P4VQvk3ueIXsHj5iIte40Xi/0Uxw1Tl +A== Received: from aserv0021.oracle.com (aserv0021.oracle.com [141.146.126.233]) by userp2130.oracle.com with ESMTP id 2gtf74804f-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Mon, 19 Mar 2018 14:43:11 +0000 Received: from aserv0122.oracle.com (aserv0122.oracle.com [141.146.126.236]) by aserv0021.oracle.com (8.14.4/8.14.4) with ESMTP id w2JEhAtE021202 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Mon, 19 Mar 2018 14:43:10 GMT Received: from abhmp0007.oracle.com (abhmp0007.oracle.com [141.146.116.13]) by aserv0122.oracle.com (8.14.4/8.14.4) with ESMTP id w2JEh9eS022996; Mon, 19 Mar 2018 14:43:10 GMT Received: from mwanda (/197.254.35.146) by default (Oracle Beehive Gateway v4.0) with ESMTP ; Mon, 19 Mar 2018 07:43:09 -0700 Date: Mon, 19 Mar 2018 17:43:01 +0300 From: Dan Carpenter To: Dmitry Torokhov , Marcus Folkesson Cc: Henrik Rydberg , linux-input@vger.kernel.org, kernel-janitors@vger.kernel.org Subject: [PATCH] Input: usbtouchscreen - double lock typo in usbtouch_close(() Message-ID: <20180319144301.GA13863@mwanda> MIME-Version: 1.0 Content-Disposition: inline X-Mailer: git-send-email haha only kidding User-Agent: Mutt/1.9.4 (2018-02-28) X-Proofpoint-Virus-Version: vendor=nai engine=5900 definitions=8836 signatures=668693 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 suspectscore=0 malwarescore=0 phishscore=0 bulkscore=0 spamscore=0 mlxscore=0 mlxlogscore=999 adultscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.0.1-1711220000 definitions=main-1803190149 Sender: linux-input-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-input@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP There is a typo so we deadlock here instead of unlocking. Fixes: 5648f00809c3 ("Input: usbtouchscreen - fix deadlock in autosuspend") Signed-off-by: Dan Carpenter --- To unsubscribe from this list: send the line "unsubscribe linux-input" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html diff --git a/drivers/input/touchscreen/usbtouchscreen.c b/drivers/input/touchscreen/usbtouchscreen.c index 4ae1cbf9e858..c6cf90868503 100644 --- a/drivers/input/touchscreen/usbtouchscreen.c +++ b/drivers/input/touchscreen/usbtouchscreen.c @@ -1479,7 +1479,7 @@ static void usbtouch_close(struct input_dev *input) if (!usbtouch->type->irq_always) usb_kill_urb(usbtouch->irq); usbtouch->is_open = false; - mutex_lock(&usbtouch->pm_mutex); + mutex_unlock(&usbtouch->pm_mutex); r = usb_autopm_get_interface(usbtouch->interface); usbtouch->interface->needs_remote_wakeup = 0;