From patchwork Fri Oct 1 12:33:08 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Dan Carpenter X-Patchwork-Id: 12530543 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 5190BC433FE for ; Fri, 1 Oct 2021 12:33:34 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 339DE61AA9 for ; Fri, 1 Oct 2021 12:33:34 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1353451AbhJAMfQ (ORCPT ); Fri, 1 Oct 2021 08:35:16 -0400 Received: from mx0b-00069f02.pphosted.com ([205.220.177.32]:1940 "EHLO mx0b-00069f02.pphosted.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231352AbhJAMfP (ORCPT ); Fri, 1 Oct 2021 08:35:15 -0400 Received: from pps.filterd (m0246632.ppops.net [127.0.0.1]) by mx0b-00069f02.pphosted.com (8.16.1.2/8.16.1.2) with SMTP id 191BRGGq023263; Fri, 1 Oct 2021 12:33:26 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oracle.com; h=date : from : to : cc : subject : message-id : content-type : mime-version; s=corp-2021-07-09; bh=1Lm7nz1NCnfPPk5jPlT5SmJqo08knjF4PCRtbN3wrv0=; b=Z7yoJkInKmB/2jOgEFfJVZMUu1TDEsg/BEThMpPwZzIbrX/sNyyRpdl7HlOD3CcLbQsI 6tTdnKSv4MLfT789wsykQCxnF6BKZ9Zcjm5x2jUb8AdJ7QNmI3aeTdgeZ7udnusIGxM/ /UphRS3adEf4vXllilyxN2QvrLju7L7Lqz37R8AXNatVgMFgcHgga2RdPybEv0/jbLIo oFTSrqMoqgWCIQqnbnZq/Grxhm6WhKm3ySB6G6FiAdpXIBfgl3PP5qE6dvNNICAxTZtP OqUAff6clh2ycHZckHnpt9GldKMJrW5Don6YgBuJI4epZklRNgV1Thn6zR1yfsDr2ma+ tw== Received: from aserp3020.oracle.com (aserp3020.oracle.com [141.146.126.70]) by mx0b-00069f02.pphosted.com with ESMTP id 3bdcqufq36-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Fri, 01 Oct 2021 12:33:26 +0000 Received: from pps.filterd (aserp3020.oracle.com [127.0.0.1]) by aserp3020.oracle.com (8.16.0.42/8.16.0.42) with SMTP id 191CTsn2159278; Fri, 1 Oct 2021 12:33:25 GMT Received: from nam12-mw2-obe.outbound.protection.outlook.com (mail-mw2nam12lp2041.outbound.protection.outlook.com [104.47.66.41]) by aserp3020.oracle.com with ESMTP id 3bceu8jq2c-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Fri, 01 Oct 2021 12:33:25 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=Y+Vx5Mvgg8ncKDpXKdG0le2ldSye6+LdLxUBxiT2C+v7WC4kym/zYxl+5kTO5WcVarkBWykm2w36wsju7eLCnkciiRx3riAWYcW8s+4kw80cMtJOnTiuiylpsI5VdGWEnnXTCVEvKAowKlKB9w28QPZ91brKpUFK3eyyTowzgMjc2OTpi9sXsfhrJluga8Qsy1eBQkPZiAd1FspuCZ7pM3Lidx1p7tpeAUxZ0X8GTbd3M4JUKxG8CMjOFcFItAP13fKPaY3boIP+exZhGHcDtw4rfQXYe2b7wYwIcdwj8py17M8NCoJd3vCh9XOw1EKX52jf+Vvf1DkcWcAdJYK7nw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=1Lm7nz1NCnfPPk5jPlT5SmJqo08knjF4PCRtbN3wrv0=; b=lzx+dKH8V2PrOcK/f9FEELB849vYJpbIfiSEbIGOy2FWQPBMLjqkGqf21b/eGXtAXyWFshrWUlVH0PVrEAB2ER+0Ld//RvgRqWt1t+eZhByoLN1Ov+STug8w/dFb1/L+N4diBEJhMFwm7HH9zm8WEII1B6n44SxQQ51KcM9Wj/sowapJxJEiKu4tvSO35RAUol0RpiJobKlwq3MjgRYRjUcZVDnEWT6Aef03PZDcDwQhQS5/k2VyPPlebHaz+0ZWGuuS+xwmuLseU0ZIVCNatPT3idS0gnjmA1B0bDDdKoxxCwdEIcBLfRTMDpBChUkiuccYs/iPXV4EKN02k7k8Yg== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=oracle.com; dmarc=pass action=none header.from=oracle.com; dkim=pass header.d=oracle.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oracle.onmicrosoft.com; s=selector2-oracle-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=1Lm7nz1NCnfPPk5jPlT5SmJqo08knjF4PCRtbN3wrv0=; b=TarZF3yFznLIdSxHc1jyvozuDhif59tfe61DKGbtFhjeXrwYT8naSoZp+3IFNtT3CimS8wUcqjnv0v0AFbT4kXyeKLJwskq4Hn/TMCd4YcW6OBxMsUh3ijpIT6R5w3DQ+AR7gcnUbKqUOEt7TohBHR6QQBAV/ObFv+csDKi5vHc= Authentication-Results: gmail.com; dkim=none (message not signed) header.d=none;gmail.com; dmarc=none action=none header.from=oracle.com; Received: from MWHPR1001MB2365.namprd10.prod.outlook.com (2603:10b6:301:2d::28) by MWHPR1001MB2319.namprd10.prod.outlook.com (2603:10b6:301:34::17) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4544.15; Fri, 1 Oct 2021 12:33:22 +0000 Received: from MWHPR1001MB2365.namprd10.prod.outlook.com ([fe80::d409:11b5:5eb2:6be9]) by MWHPR1001MB2365.namprd10.prod.outlook.com ([fe80::d409:11b5:5eb2:6be9%5]) with mapi id 15.20.4544.025; Fri, 1 Oct 2021 12:33:22 +0000 Date: Fri, 1 Oct 2021 15:33:08 +0300 From: Dan Carpenter To: Rob Clark , Chandan Uddaraju Cc: Sean Paul , David Airlie , Daniel Vetter , Dmitry Baryshkov , Abhinav Kumar , Bjorn Andersson , Archit Taneja , linux-arm-msm@vger.kernel.org, dri-devel@lists.freedesktop.org, freedreno@lists.freedesktop.org, kernel-janitors@vger.kernel.org Subject: [PATCH 1/3] drm/msm/dsi: Fix an error code in msm_dsi_modeset_init() Message-ID: <20211001123308.GF2283@kili> Content-Disposition: inline X-Mailer: git-send-email haha only kidding User-Agent: Mutt/1.10.1 (2018-07-13) X-ClientProxiedBy: ZR0P278CA0042.CHEP278.PROD.OUTLOOK.COM (2603:10a6:910:1d::11) To MWHPR1001MB2365.namprd10.prod.outlook.com (2603:10b6:301:2d::28) MIME-Version: 1.0 Received: from kili (62.8.83.99) by ZR0P278CA0042.CHEP278.PROD.OUTLOOK.COM (2603:10a6:910:1d::11) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4566.14 via Frontend Transport; Fri, 1 Oct 2021 12:33:16 +0000 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: d1ac8c0c-f045-4198-66cf-08d984d7a7f8 X-MS-TrafficTypeDiagnostic: MWHPR1001MB2319: X-MS-Exchange-Transport-Forked: True X-Microsoft-Antispam-PRVS: X-MS-Oob-TLC-OOBClassifiers: OLM:773; X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: uDOxgasmQouaDxy48f7bgfoL3tySNs2DzkB5CpWVOS3iK0T1ISKaAYDgjgAIJbTgtoNIqQafRE1NWCj2VdRDBYwlILxkIHRJyCm2bcbhfFjE0Q+1/gWLpi7bnHAp47wPs5D9h5HdhLorwdBG7tXZCTM2IQVYgxlui1PLIPEhZ/8vf9/E/J0a8wwlPexc12gbHAWHH37WvcoYk4O7+sI4ebwHRe6OwcD/zxzaqV4qcN769LrJQqJOMSKCI6pgl4FZsoUIco39Bdb34HYuugTuak0kHpEM53JKobcFD9YuMoFbfYjfYrJ0rFVZF01hZ0C0unjPikH9kfgN3GnaqpWnbPo4hQkjN7Moy860V1lQV+BCmmW/csHODaAGSP5fryDgOeTs5AGF5bR2JKF85vdYitC6+b3KYWSJEKyNu+pUioE5hr1/PDlCA4wkutuiO/RLg9hMEhX5LzBJHjxoMax14odGOs6rHcwSv10vagm82Ut1EaTNwqt3YUAh2mTDxI+JEv2HH0bSt3Zt5uLhlMSebPNenisWQrLYphFkx10/9W3D+tTv6ln8qAr7le+WXD2BooLsyMi2DBty28UiFNHyDp9RNJs/o7GWKA71ejPPJarhicwATnI83wTOZcJpWtAPI+MsgXHQLTcAH4kGJDXslvAdrtDp5oqvYWderOKBxAgRww6BYgE4BveSeGjwDVyfyBF00W+2Uq0FENo6/9Hzbg== X-Forefront-Antispam-Report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:MWHPR1001MB2365.namprd10.prod.outlook.com;PTR:;CAT:NONE;SFS:(366004)(9686003)(5660300002)(316002)(6496006)(8936002)(52116002)(33716001)(33656002)(55016002)(66556008)(4326008)(66476007)(8676002)(38350700002)(38100700002)(66946007)(44832011)(7416002)(1076003)(508600001)(4744005)(6666004)(110136005)(9576002)(86362001)(26005)(2906002)(186003)(54906003)(956004)(83380400001);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: pg2CfupDzV8ROMPiW9xweAKFn4aRst7/kf2YQePsrZFeGAq5Y95E6+tJbVCqVYR/63aVPuLVY0eSNopEIuIKzojVkfJoGERVhwR2G9DbOhWxYC7tIVkcDQcXzb2F700rvsEyw9vxtuHaj+9abml6u3GPGRMRiF96rpTdakaFhXNTWOT7PVz0NAs7TQxvWykRgTgv3JU6WZYsaTQ6m67ycBoPfb0wjwjgao/vebwPYQEWnc/agoFBaifOHbcgOUWy3GpJIs86qFct71ixN/xJuJDB6NqalPegqECii0cWV4Wre5sp4XPlFa63k2T+OR4XBWEAaKK3ZuNeB4DNUX3aaDZ66D9K4mHPpUr1+/AkDI2U0HHWrpdb6XugEl+z949a3QTK9x6dFBc/dJcd2QB5O/+VJFqh+EwGI/ExaFqSIJK1Hjp9pg037i9Uy2LN3LikSHb74/fwFp/u32Ai0JMTbVLdhzZR/qhQFXsabIdWDqNDDAgxj9+rIRcI0Rp99+9uV28UsFCgogYFcuvpgWwO59yHPemQvgSMhmeceBHnWaqE2KfkrmgAQae558aD87pk5/2h4tuk0beD3tldkDkhLf6XjY5LIxb0YDiO9ZzAmuTX9nFoWKQxWvNRKWlODtrR9qUlO9MJoa4VB+n9Ncy+21JrM8MpU8qN7t0U6l9bYk21LP4/G1zp3qQTr8DF31F/gtawfrgxyWh5/ZLy4L+BJUOlocnIBhJbCA7TevwBlye/XHLpT9oTrQNTV9BIaC3ezKoANhYG4JNP7H9iTS+q0mNleZfVp2fUJVK5IUzT/F8Yk3O+hbd5t9BmHMNhU377jwH3PSQxk+wnqavEWHLtmP1GpNSXwo1U0YLRkmo2dECWASUyY4Euct1O3yC96eduupT2ymWXAvRcT78SyD5Qa3dIrwOnqt5Is0ivhlozlWOKSQO1GciMZw+uU0Z5Dzy1D3xQ3S+ERNwf8qpGDgP1Hj3FtsENkOsVwMrT4uRiCKWh/vIWy9i3DTid9yvOzy4PhDSXa9YHOieOeLA1mGn6BlJb2FVjZhpae5uVTikDJh7A9C8FKnTXz6WOlxp/LqBACCdF5tMb7IpWfRQQa0iLqxoUW3NNDyvEWfuulfOAG6o2gdoLiXnw9BjIoSk8nNh1nHt/89TRJZPGjnlASZzTeCiqoLgFjMOZZhEqunTnm5h8dUlh7qMwqF8QKvRRXesuR1k5Nt5tspDUGWeMcOEyrm+dQ7/U6DW0ZYccLiVjYPehHRrARWU4SsTtoLwveSTXM8ADlAgaaihejMomh72uWwr8rgEnATNGz7uyluu5D4LA99BilAEACGbA4AbS9eRl X-OriginatorOrg: oracle.com X-MS-Exchange-CrossTenant-Network-Message-Id: d1ac8c0c-f045-4198-66cf-08d984d7a7f8 X-MS-Exchange-CrossTenant-AuthSource: MWHPR1001MB2365.namprd10.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 01 Oct 2021 12:33:22.1634 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 4e2c6054-71cb-48f1-bd6c-3a9705aca71b X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: fyxwQoBX7tks26FXQqZLI9zzE7oitVvbYdwGPDi3YxorpaArrn87mC7PI3EgWOzMq9NmG4QG6aE/GR31fRxiI43a/Kh+Qsn6jFBYUU8IFLM= X-MS-Exchange-Transport-CrossTenantHeadersStamped: MWHPR1001MB2319 X-Proofpoint-Virus-Version: vendor=nai engine=6300 definitions=10123 signatures=668683 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 phishscore=0 suspectscore=0 spamscore=0 adultscore=0 bulkscore=0 mlxscore=0 malwarescore=0 mlxlogscore=999 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2109230001 definitions=main-2110010082 X-Proofpoint-GUID: qH3HZ1SJw2J9WPHaGm2j6DfawEwmt_rO X-Proofpoint-ORIG-GUID: qH3HZ1SJw2J9WPHaGm2j6DfawEwmt_rO Precedence: bulk List-ID: X-Mailing-List: linux-arm-msm@vger.kernel.org Return an error code if msm_dsi_manager_validate_current_config(). Don't return success. Fixes: 8b03ad30e314 ("drm/msm/dsi: Use one connector for dual DSI mode") Signed-off-by: Dan Carpenter Reviewed-by: Dmitry Baryshkov --- drivers/gpu/drm/msm/dsi/dsi.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/drivers/gpu/drm/msm/dsi/dsi.c b/drivers/gpu/drm/msm/dsi/dsi.c index 614dc7f26f2c..75ae3008b68f 100644 --- a/drivers/gpu/drm/msm/dsi/dsi.c +++ b/drivers/gpu/drm/msm/dsi/dsi.c @@ -215,8 +215,10 @@ int msm_dsi_modeset_init(struct msm_dsi *msm_dsi, struct drm_device *dev, goto fail; } - if (!msm_dsi_manager_validate_current_config(msm_dsi->id)) + if (!msm_dsi_manager_validate_current_config(msm_dsi->id)) { + ret = -EINVAL; goto fail; + } msm_dsi->encoder = encoder; From patchwork Fri Oct 1 12:34:09 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Dan Carpenter X-Patchwork-Id: 12530549 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id E37BEC433EF for ; Fri, 1 Oct 2021 12:34:44 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id C381361AA7 for ; Fri, 1 Oct 2021 12:34:44 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1353449AbhJAMg2 (ORCPT ); Fri, 1 Oct 2021 08:36:28 -0400 Received: from mx0b-00069f02.pphosted.com ([205.220.177.32]:26244 "EHLO mx0b-00069f02.pphosted.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231352AbhJAMg1 (ORCPT ); Fri, 1 Oct 2021 08:36:27 -0400 Received: from pps.filterd (m0246631.ppops.net [127.0.0.1]) by mx0b-00069f02.pphosted.com (8.16.1.2/8.16.1.2) with SMTP id 191BRtrN004209; Fri, 1 Oct 2021 12:34:38 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oracle.com; h=date : from : to : cc : subject : message-id : content-type : in-reply-to : mime-version; s=corp-2021-07-09; bh=D4UnEYEAOvalaJjZbDQXHN1EA8IdvxV28mDIcY2JZ+k=; b=RlldPlK8Ek8TF1nXxd6ggtTU4SiUR7CGQopmD7LE4Nt4Z/XYwcUz7Yq2nEtiTTmQBitN G//uDHBN41KiQPlaikTugW2g75sbTS+Lm1uE8HzGKDv1+cUrYpsqL4VzwDeu3cuOXoBU KSd66vvspCHSTC1DyTHUnDgNJDMPtHf3jv86BneZR0dxGntHXt6CP/a9/i83iFzTaGfx 8/csA19t07p3PQpfMW9MeKrNRh+pEMZIyb3trm49/MZ8DvVLOGhy1HJjHYZdLs8sMyb0 6/YBTGJP2OTbYHXz+YHVp21JaNHRV6mt7LJkPV/c54l8H0lAN8icXjnbDIsCZHSDdRtc +w== Received: from userp3020.oracle.com (userp3020.oracle.com [156.151.31.79]) by mx0b-00069f02.pphosted.com with ESMTP id 3bddu8ybyy-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Fri, 01 Oct 2021 12:34:37 +0000 Received: from pps.filterd (userp3020.oracle.com [127.0.0.1]) by userp3020.oracle.com (8.16.0.42/8.16.0.42) with SMTP id 191CUMcG064625; Fri, 1 Oct 2021 12:34:36 GMT Received: from nam04-bn8-obe.outbound.protection.outlook.com (mail-bn8nam08lp2044.outbound.protection.outlook.com [104.47.74.44]) by userp3020.oracle.com with ESMTP id 3bc3cheg14-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Fri, 01 Oct 2021 12:34:36 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=fcEPyo3drmw6imYg3Lmxx4cbII0LMoreZet0EI8kCFwW2UWgropYDP/tcUGVT3XnrseHWeCJa1mINvgPFCjiR2qpA3sdYUD2OIceKjoECI7nUfLfEuvQKVla3Eq0vc7GoRCaV/0ZKvix9FaSKZClPhHFIbfNIfz5Mtasj59uzdmURFG3RS5gxvj0J6PUHiPz2QLu4nvWmGkDG7LLho9N/RgYgFEhKIdORw5ErbPhvqsxlUFgzXXdjGipc3J9GBQ1aNN8TKEAWfy+h5rxfNvz83nbNP4fTiyMQYjW4guNSu2SjmhjTjjyQQwFQ6pqRRi6vmV4Aq5vOm6cCex5VOBpYg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=D4UnEYEAOvalaJjZbDQXHN1EA8IdvxV28mDIcY2JZ+k=; b=PTUhAIOXzYY/m6pivdeuJUc8nAumTTZm2Cwwg6rL2aF1RraDD5VzM4DCULNou9/2xeBtwB99JwjXmZh12/IQ2XVdf7qnD5fYP02nA4Ihk/gLGhVfWhiZmp6A+nF21pDtcnm9l10nByLdcIroGZKxje7qc2GBAZ/LdAYYorVidNu0QceQiPEHQ3y2KFAH5cit5d17SS1YFnAf4EWTiTqpziwHZn9ykVogOwZsE0Hk/Wb2CBd6moGTaL2C+J6DHOfe/ZK2fkJ2TfZULhvjqNbltxyJ+jDaK6fFeDiiPebCY2735EqTtmed1h9QvasDMsJ/OKXr8eadDF1aOB/mwS62wg== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=oracle.com; dmarc=pass action=none header.from=oracle.com; dkim=pass header.d=oracle.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oracle.onmicrosoft.com; s=selector2-oracle-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=D4UnEYEAOvalaJjZbDQXHN1EA8IdvxV28mDIcY2JZ+k=; b=LveKp8w29O3wKEWAeuRBlfpTITti+Sfo4R9jumGb4iO0tF1cOfCC5ZVTBVa+NhLRPjpZujPWyKaZIStOJQ4DLKDOq0pa4H5DEAwxbiMQ0ud/i1yw3doShJZK52Lz/En39yCka0OhVPEmufFoW1E0zB9bJ6LU3DfG86+OY9aMhL8= Authentication-Results: gmail.com; dkim=none (message not signed) header.d=none;gmail.com; dmarc=none action=none header.from=oracle.com; Received: from MWHPR1001MB2365.namprd10.prod.outlook.com (2603:10b6:301:2d::28) by MWHPR10MB1567.namprd10.prod.outlook.com (2603:10b6:300:25::8) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4566.14; Fri, 1 Oct 2021 12:34:34 +0000 Received: from MWHPR1001MB2365.namprd10.prod.outlook.com ([fe80::d409:11b5:5eb2:6be9]) by MWHPR1001MB2365.namprd10.prod.outlook.com ([fe80::d409:11b5:5eb2:6be9%5]) with mapi id 15.20.4544.025; Fri, 1 Oct 2021 12:34:34 +0000 Date: Fri, 1 Oct 2021 15:34:09 +0300 From: Dan Carpenter To: Rob Clark , Archit Taneja Cc: Sean Paul , David Airlie , Daniel Vetter , Dmitry Baryshkov , Abhinav Kumar , Bjorn Andersson , Viresh Kumar , Jonathan Marek , Yangtao Li , Nicolas Boichat , linux-arm-msm@vger.kernel.org, dri-devel@lists.freedesktop.org, freedreno@lists.freedesktop.org, kernel-janitors@vger.kernel.org Subject: [PATCH 2/3] drm/msm/dsi: fix off by one in dsi_bus_clk_enable error handling Message-ID: <20211001123409.GG2283@kili> Content-Disposition: inline In-Reply-To: <20211001123308.GF2283@kili> X-Mailer: git-send-email haha only kidding User-Agent: Mutt/1.10.1 (2018-07-13) X-ClientProxiedBy: ZR0P278CA0028.CHEP278.PROD.OUTLOOK.COM (2603:10a6:910:1c::15) To MWHPR1001MB2365.namprd10.prod.outlook.com (2603:10b6:301:2d::28) MIME-Version: 1.0 Received: from kili (62.8.83.99) by ZR0P278CA0028.CHEP278.PROD.OUTLOOK.COM (2603:10a6:910:1c::15) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4566.13 via Frontend Transport; Fri, 1 Oct 2021 12:34:23 +0000 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 4368600c-1abb-45b8-7a38-08d984d7d2ec X-MS-TrafficTypeDiagnostic: MWHPR10MB1567: X-MS-Exchange-Transport-Forked: True X-Microsoft-Antispam-PRVS: X-MS-Oob-TLC-OOBClassifiers: OLM:3276; X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: 8Xpw0M31Cxtep1WAGPWW3nhmHwP0UmEiwSTY5adbEg/T/OHHvdpNNo1JX0huqxmQiQc2LwkCpq4ZdSxpq+DVTr4bE19A+NRnh0MfyOvyLQBRe1HU4vcHqIuQ+vVrCDemSws24cqP3UJ/pahoVntw3T3EEZaMbiUn7WgMeybZk5yZjd/w2Ow2+RS+r8oYonklWkyMvBYvGBjwSH58vEfbzyH1zKhh8krGfGkPFp6/qBO6IwamC9B9S2tBNilMLI27ndevLRxWqL+x1L/wW250FDXBe7pTJ3/jFSuR3B9pDDat3DGAm/vtTAKrV2ye3WtmS7SWUU2fsPe8dVPndxkviqZ45geF/suiSl6hzs8CGu5AJmz4nxLmCRY2bxnkEGYWHMqdgeMCJxkEEgwZ4j2yAO3a0o2fKh0g25ft2nFi0LZpfXCZB43SoAROH6kG15hYhhuN74PEB71ZfqxmRbQuWPWZWiCaLBd1jcivIQQQ5jSg4RdKtsmp8XbuC/Fd1qSo8erPkI1rgXmlFKLRx1UhZ3uh8XaodZ3pmA6jRMZdTL4h1x/eRHWP4fP1NBDRVkIO5dauHAJ9xzkwYQjvM5Zb2QAKG36XbQfANo0CHqqrSpK9MqjMDVabfNfOZmKL0+Nck5tQFljgNgO30w9pLVS9SWXau0yCtrOe7R11lO77dsN2kOWTTg8PqbpzSCgplwLWSyxlavMXGXitln6Ue7WHVg== X-Forefront-Antispam-Report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:MWHPR1001MB2365.namprd10.prod.outlook.com;PTR:;CAT:NONE;SFS:(366004)(54906003)(6496006)(52116002)(66476007)(5660300002)(2906002)(55016002)(6666004)(33716001)(316002)(4326008)(7416002)(8676002)(9576002)(9686003)(44832011)(66946007)(8936002)(508600001)(4744005)(110136005)(66556008)(1076003)(956004)(33656002)(38100700002)(26005)(86362001)(38350700002)(186003)(83380400001);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: e7ScwplS879u/S4NOS0ltIbXybkpqgZyJH5/+ncSiW8/ke8PbRumDXYu4oyFnrhssiH3CQ6aMKCWho8+DheTZCAmuYUgPHR8kISDAmOT69y9d/6sgPiNjLsFTuaG/co7dLAJ/LVtIiaCngEbv5olaRYtKmw6g0+Qf17swcDD8MTQBBKsB6MXiXUrNvykeoB95ShhQUl2Fj+kDwAGd8vMs2Ro8ZV7TUtBKZ/4gNlpYHZJB/JTCr2rFspysP21e+qIUAAV7u8i81nqIT0F/lg0uuistpVHAn/MoIMHrYkq17b2cxbJrSIk4ulDq6PdP4nZPQ4SUutcql3wM5VSKr1o1viS/0Ifnxmf67B3jeoHWvYjsHkGLXd/n0Foy9P+weMSYPe+MaNjGy0E1XQqUlT3FesmbA0tVwGcZlqc1iMW2ELRpT3KgA1HyLj/uTg/N7OsuZRJgfDEuq/UjKvLg9lYTfq4WSUyVnbSObt0I8soLuOMdQc1MpDEyT8XJzk1h9M+4n5wblA8ZMU7ZBqluZCVRsDK00bG7h5sAQ+vLahbAoIVnSyFOhgqxkReBVPowMZl3vamSQZir7fc8mB/No5amiApWG8cXJm3WRVILbzXYWjtLk7p7jHZqIcAhd3AY1B9IQx22xWJTiqAbwICNz9LE8jgSwDsv7BDXK8oJgI3u3U8E7rWmFV7jbB6YqBUnPACXAK5CwHXHPOXqRyDi4olr6Jt66Y0WahzSgMQJ6VPnx1uSqDjZByL/dV/6P4DbnGbNWn5Xbd9Rk2JcXHdSYsGzV+tBs4/f20PFKO0ohzEqp/tYgmsOzRGr6EoBqheZz3RFi0QNaaYEjXwNf83DREJlay8PgzPeePBmoa26UkGOSxOX0dwVkN8uY1ABDb8tpYFIe6HT1a7DZeNIAFo1QoZYq83R7SIoaG96ZLLHSlbnI3sZiIXw4q5LN0cujLiaxFqFpFF84l9c4gEDFdRIySwKCIZT3jXHrs2bpasSToOJISrml7X6eq6K2kYqYJxaF+EoHRjKXveqgh3No8VJMEuFqXdCbak1U/9dJHSwQNLnd7jVDu263t7sX3bpXm/4SwtKpQ7sCQQFdAzYIRGCD0GmMV1IwfpAjTtibxyLZ85c0bbrgH7xqXXtE4PZ3ox/gLXTfceht6VDz7rG/dwb/fwHF3gEQdxsQzpgnExLIQbSExpj8ekMlXEQBgQKIoLJr0vC7eZwBxVLBkCMfh3Qt/3bXktC5LyyxUkk8hppmb/ouxOoZgQHmT/vQ5iK/g8BWMQ9wGm9dnMVmzks506XrcGC2OArwTzn9CYGVeFWUrs1+/91xXDYG3WDiC7f55fSon6 X-OriginatorOrg: oracle.com X-MS-Exchange-CrossTenant-Network-Message-Id: 4368600c-1abb-45b8-7a38-08d984d7d2ec X-MS-Exchange-CrossTenant-AuthSource: MWHPR1001MB2365.namprd10.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 01 Oct 2021 12:34:34.2613 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 4e2c6054-71cb-48f1-bd6c-3a9705aca71b X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: SrRfb9pLoD6gK9D5QIxmL/WYIK7E6bIFmfy2bAfvzPR16jA4q2Wg37kXVFP7tdtoHcqusPc07mtkIr3r4YMy5e3aa/ZIbwwr52Y6o6Dj7+s= X-MS-Exchange-Transport-CrossTenantHeadersStamped: MWHPR10MB1567 X-Proofpoint-Virus-Version: vendor=nai engine=6300 definitions=10123 signatures=668683 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 adultscore=0 mlxscore=0 mlxlogscore=999 phishscore=0 bulkscore=0 suspectscore=0 malwarescore=0 spamscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2109230001 definitions=main-2110010082 X-Proofpoint-GUID: 3MqIHj-Lsri6luIaBPIHwrrTAVXGHypj X-Proofpoint-ORIG-GUID: 3MqIHj-Lsri6luIaBPIHwrrTAVXGHypj Precedence: bulk List-ID: X-Mailing-List: linux-arm-msm@vger.kernel.org This disables a lock which wasn't enabled and it does not disable the first lock in the array. Fixes: 6e0eb52eba9e ("drm/msm/dsi: Parse bus clocks from a list") Signed-off-by: Dan Carpenter Reviewed-by: Dmitry Baryshkov --- drivers/gpu/drm/msm/dsi/dsi_host.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/gpu/drm/msm/dsi/dsi_host.c b/drivers/gpu/drm/msm/dsi/dsi_host.c index e269df285136..c86b5090fae6 100644 --- a/drivers/gpu/drm/msm/dsi/dsi_host.c +++ b/drivers/gpu/drm/msm/dsi/dsi_host.c @@ -451,7 +451,7 @@ static int dsi_bus_clk_enable(struct msm_dsi_host *msm_host) return 0; err: - for (; i > 0; i--) + while (--i >= 0) clk_disable_unprepare(msm_host->bus_clks[i]); return ret; From patchwork Fri Oct 1 12:36:17 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Dan Carpenter X-Patchwork-Id: 12530551 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id C183FC433FE for ; Fri, 1 Oct 2021 12:36:48 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id A6825613A6 for ; Fri, 1 Oct 2021 12:36:48 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231407AbhJAMib (ORCPT ); Fri, 1 Oct 2021 08:38:31 -0400 Received: from mx0b-00069f02.pphosted.com ([205.220.177.32]:24770 "EHLO mx0b-00069f02.pphosted.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231352AbhJAMib (ORCPT ); Fri, 1 Oct 2021 08:38:31 -0400 Received: from pps.filterd (m0246631.ppops.net [127.0.0.1]) by mx0b-00069f02.pphosted.com (8.16.1.2/8.16.1.2) with SMTP id 191BKXBX004210; Fri, 1 Oct 2021 12:36:40 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oracle.com; h=date : from : to : cc : subject : message-id : content-type : in-reply-to : mime-version; s=corp-2021-07-09; bh=Ijb0vKGJG7Imn7Who5sxo8V7fj1tlCxR1FcCk9ADDcg=; b=Cs3kRwJ+IH6+tzpQxG3hnq/oTSIYkhU1HVMu+INMxiGd1k7uxTVW90AL8vrl7NwQftQ8 Cb+H0b0sjQmo9WAeAzyZtlcpzT6HQk01eSXfsmOa1WjIttXfeg/aPZt/jyy0BF+EN8Fm 38v0K0AoKxvmieZ+kgJ9cflUuMS5XSLYu5iNgqLzhzyDWzBfTwb+4B4FGRuyWjRowP/F Hwi/u5iGs7hi7Wzcw8jmizcNe1zO2dhmJ4BATlgRVycpVMKjMROXXzHvF6RcpDkZllXA NG2Za3lCKTKFgpH3clr43obyM3DUDw4vhiiOBoK9o5PWItcbR4q67OSeBqDXOjXxu+U9 JQ== Received: from userp3020.oracle.com (userp3020.oracle.com [156.151.31.79]) by mx0b-00069f02.pphosted.com with ESMTP id 3bddu8yc64-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Fri, 01 Oct 2021 12:36:40 +0000 Received: from pps.filterd (userp3020.oracle.com [127.0.0.1]) by userp3020.oracle.com (8.16.0.42/8.16.0.42) with SMTP id 191CaPAu086172; Fri, 1 Oct 2021 12:36:34 GMT Received: from nam12-bn8-obe.outbound.protection.outlook.com (mail-bn8nam12lp2172.outbound.protection.outlook.com [104.47.55.172]) by userp3020.oracle.com with ESMTP id 3bc3chej0c-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Fri, 01 Oct 2021 12:36:34 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=eyzzaHviw7G2ovFCK1wUvNVcZlKvtN+CLCiPyCLKhNVYZL3kQ+Ie7PTrB85YxnlkUvQV3meaC22GZDIVWuusYD9Qzbi3Q72O6sRBicUX7m+u8hMISNavzAUUmywQkacl8QZz4euAvB8bN03nr2ojMv9KtqtDulgKlIm4M1eiao3mWoZIZg4EzifbAYDeb6zWn6+atK5J5qSbA1FKfArc2v78LijFef+w5BwgaTiN35EbUiJOIrUntxt0h+qpNKY5AIv1fOolXElRjfzCzujqDbYHSjFCKL6U+TUPE50HtVM0JIVHwWH57cMwM4Lt+DQW1Umwe9o1n5BVxp4UoJDazg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=Ijb0vKGJG7Imn7Who5sxo8V7fj1tlCxR1FcCk9ADDcg=; b=e1/eZeYfCCjrGwQz95wJ0ORukkH06IsTk2Dobm2vC+vNryrLX10Y76EOqR7L9YpS1ZddwEHgyFlfhAlz7OLY2FzEXZCOkNowweKQZs5SlTe5bwEBaNLb+fpkQ+3jHKpTGS+C3RdFmxLvB7EBFQ8ZTeRa3tV4uslX+dCX9UK2goFEHaBtJVDuMjKY8+1XX36YFrYBPBWfgMtRqIAoy4DkwXk9ZxPgYcaOYy+EOs81GHA86NtZXk7Xj1MAcqjuqQd7UL/4qQl6zjWEfSJDBIGXvOhrhML3jSE+B8ZacvjYYPimq8miexMEwkPhgOVuaeCOPsLgfUODjockQNCTBy14rA== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=oracle.com; dmarc=pass action=none header.from=oracle.com; dkim=pass header.d=oracle.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oracle.onmicrosoft.com; s=selector2-oracle-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=Ijb0vKGJG7Imn7Who5sxo8V7fj1tlCxR1FcCk9ADDcg=; b=CLduq6xcu1pu/jc7zgnhI6kYUyVh3qiJkvNRkFAtmKLkX8+YO/Xw/BzuuXZsdjW3/AkKSs8DnUuUJh3wjDFznzwyAugpgAlRT6CEv+y4U1UqVgQmEpCsLkPVb6V20YO1SZGkTswd18xwIZ0mueD6KTzW+XPoXORJkMliQOGXb18= Authentication-Results: gmail.com; dkim=none (message not signed) header.d=none;gmail.com; dmarc=none action=none header.from=oracle.com; Received: from MWHPR1001MB2365.namprd10.prod.outlook.com (2603:10b6:301:2d::28) by CO6PR10MB5572.namprd10.prod.outlook.com (2603:10b6:303:147::6) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4566.15; Fri, 1 Oct 2021 12:36:30 +0000 Received: from MWHPR1001MB2365.namprd10.prod.outlook.com ([fe80::d409:11b5:5eb2:6be9]) by MWHPR1001MB2365.namprd10.prod.outlook.com ([fe80::d409:11b5:5eb2:6be9%5]) with mapi id 15.20.4544.025; Fri, 1 Oct 2021 12:36:30 +0000 Date: Fri, 1 Oct 2021 15:36:17 +0300 From: Dan Carpenter To: Rob Clark , Hai Li Cc: Sean Paul , David Airlie , Daniel Vetter , Dmitry Baryshkov , Abhinav Kumar , Viresh Kumar , Jonathan Marek , Yangtao Li , Nicolas Boichat , linux-arm-msm@vger.kernel.org, dri-devel@lists.freedesktop.org, freedreno@lists.freedesktop.org, kernel-janitors@vger.kernel.org Subject: [PATCH 3/3] drm/msm/dsi: fix signedness bug in msm_dsi_host_cmd_rx() Message-ID: <20211001123617.GH2283@kili> Content-Disposition: inline In-Reply-To: <20211001123308.GF2283@kili> X-Mailer: git-send-email haha only kidding User-Agent: Mutt/1.10.1 (2018-07-13) X-ClientProxiedBy: ZR0P278CA0036.CHEP278.PROD.OUTLOOK.COM (2603:10a6:910:1c::23) To MWHPR1001MB2365.namprd10.prod.outlook.com (2603:10b6:301:2d::28) MIME-Version: 1.0 Received: from kili (62.8.83.99) by ZR0P278CA0036.CHEP278.PROD.OUTLOOK.COM (2603:10a6:910:1c::23) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4566.15 via Frontend Transport; Fri, 1 Oct 2021 12:36:24 +0000 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 2244647a-064a-4338-3d63-08d984d8181d X-MS-TrafficTypeDiagnostic: CO6PR10MB5572: X-MS-Exchange-Transport-Forked: True X-Microsoft-Antispam-PRVS: X-MS-Oob-TLC-OOBClassifiers: OLM:1417; X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: +68aov7LlBN1EDQ7YCbMjooYH2bweJatV9IR27+HIJ0FyebUHoSrrS/Y8NbfOhtsT5xLkUZwY88neUDCqyFvP+eHi6f4YBAzkoVnXXc6vNlo1du1S+8ODVLiQL50TvRKlZwTy1yIBMZWlBFZ9aAgivJO3J6w2Gry5TdUiHpZj1SKx9CJgNmDumprnsixnF5EyXHwcN2W/Z91IZUB80hF1O23aO/L9xb5gGDjgsgZMTOpNGfRi7JHsHrQk+K6d/0FakhimiLy6iUU9yfZ2ztiNfu/WNAh29yWik2vDLLcflcjKM2B9kLPoae56D21D14y/DThP6Lz0svQ9YqkiJSZyqH1s2cgKdbpr9Mj68LfkASe2YRfsWGWx3pWxjkL7WKcV3L4uzlbKSwmk+VjV6JH1/lUVTb4yf/CCFzDTBRj2PYEnHESrzzN5ILhbDoDtePH32xncWCB31qJMCGxu9DCACwjUOi1NpyxMmOKGlnPAVh/w/y4hMRT2L7JGF2SRyOfbxQVN2g43/uCtieyuwgFr1M6igWJVAkx2g5BO4Tl4UsqnbUnY3sX0AdSq0b8FV1gcRKDlPxIae+cQ+ZBsDc7YYGnjm2Gnu9YHhBMTkRR35XGlemlAUw74eAW0wO3OLfbW+ApcsavyB74x+inU1Iwu2/4x1Fj5TJ6egtoGMC9yI3T7JrP0+hEKU+pafFDXiQ/ X-Forefront-Antispam-Report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:MWHPR1001MB2365.namprd10.prod.outlook.com;PTR:;CAT:NONE;SFS:(366004)(5660300002)(2906002)(1076003)(186003)(4744005)(86362001)(9576002)(4326008)(316002)(54906003)(8676002)(44832011)(8936002)(110136005)(7416002)(33656002)(6496006)(52116002)(6666004)(83380400001)(956004)(66946007)(66556008)(66476007)(9686003)(38350700002)(508600001)(55016002)(33716001)(26005)(38100700002);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: eoaA4UZoEXzE3cQCQx7T4QjYt1OyPHCUjXMNSSxqOrL9r+p/uh2WtsCqy5VK7NGrKSgTOqcanuWzKV+HhE4k0UcLtto+9SHh1gAhXWU4YWgpdaAgfJtSiILPUBGHTvfjvRBIxxhuAMGRX5g0IqseIco7ODEWpB+/O7U+8+Sy+pLt//uyt+Rl1FqDtCjlbOsQcBbD/nFwsB6rJ/Zy8UAJhowegVoQvoX6W6Tr2ESi3cpcIQJYZYBDVo3N0Yrqs+4zmOsgOwJsB/hKdWgSVW0z3S/6wpXcQxjtuNaQlm9TgZGQp01nHNGjh67gFcWAGBaxXHAKrSKW7OMbGevjH1g0Jwyt4UjsSQ6zWrtkK3RvdfxkmBJKJeei7UNbmu90+Kna+5cx/bG3kZoKk4IPdPJFDcwCniFsaOiuG6Sj+6rWe/s/oowc7jkH+G7hhqcrSx4a1PWAnaj1W4BLiw3CM87XE6nPQRmrUMmxBeddxfpjWhwj04JPQZ2axsfv0gHWEsDCbxeCdyVcxDwt7mCQcNiOhf5LJOW6mtkw0pS+BLZ//RaPETZ6WpSOP3ol45Bc2JyqaEK9ZF+mProfaZPWe1OXAmlDOgljXKVFdc7FZFUJYHiOKjQtdXl7BMXr1BZpChSf5hgJtWoGmuSpZWnU08HdAEJ/P6M/o0A5ayQSMmn76+kSsEbm7ME3hlqgBxKgLQBOD+OhAFysXn/21XDbGRP2MejctrqG0wK8zR/rzSXlvc+wFnHd3W6GnPW49fqc5yfXn3k7djkeh8JJmrbdG2YBhwkxHkGwLKMjNOqeJ9vyAPEuVaP9+FmBx78Df86Zhp8x26dOHoTQtiv678MC8flvO08QoifcbyiKEAKAUOBURS0IMhpEIWc2xx/92eZ/pCn3gvMVO2gbqiKBoOK/8N9YbuLJKXb3HZxUwwmYZ44zzalyITJV5AXGJ9Ng8dXe74QA6euYbzXn+iWMyaL6w0jDkWOfPJ64J8re5OtSQWUzODS0QZIEDVyUr0u9PVV5krX7NX87Om3ETyOO0KTIJT2OvF0hLGWJmkUy65l49YsGt3lfAf4BLtioSXzI9EAYKscOgaHxzSCon23HJdipjn4aRcA0LcKlsG9H/ncIySxjSv34Id0Fd0/EX3Ek63T1i/kD0qcUq9WnJimuj9UVGprnFf0FycAKipRXOgldRFa9hGuTv9/P5ecOMHzbsBSnAwfDPzXyp17Y0j5e0uFzK7RuglUC5qZMtWRenb9buo83UElD8uF7TCKft7H/O0tiQWiz4/cc514eoDxt2/Uy+/PXTLKreNUUqQgBk8DBToQqszWMyjVe34dh2MIJljTPrCdn X-OriginatorOrg: oracle.com X-MS-Exchange-CrossTenant-Network-Message-Id: 2244647a-064a-4338-3d63-08d984d8181d X-MS-Exchange-CrossTenant-AuthSource: MWHPR1001MB2365.namprd10.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 01 Oct 2021 12:36:30.3057 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 4e2c6054-71cb-48f1-bd6c-3a9705aca71b X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: ik/1/OtIasDVskYmgIoAM1GrcPqgArBpwkgZhXX7oDe/BbZCpGOpE2HpetqdZMEZ7W33yEVcQkp9LMExGkCdIAgSsKqwXdV8wdkFsPVK5A4= X-MS-Exchange-Transport-CrossTenantHeadersStamped: CO6PR10MB5572 X-Proofpoint-Virus-Version: vendor=nai engine=6300 definitions=10123 signatures=668683 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 adultscore=0 mlxscore=0 mlxlogscore=999 phishscore=0 bulkscore=0 suspectscore=0 malwarescore=0 spamscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2109230001 definitions=main-2110010083 X-Proofpoint-GUID: -1wFYrS0z8yeX1zf23m_gvL3I_lt53I2 X-Proofpoint-ORIG-GUID: -1wFYrS0z8yeX1zf23m_gvL3I_lt53I2 Precedence: bulk List-ID: X-Mailing-List: linux-arm-msm@vger.kernel.org The "msg->tx_len" variable is type size_t so if dsi_cmds2buf_tx() returns a negative error code that it type promoted to a high positive value and treat as a success. The second problem with this code is that it can return meaningless positive values on error. Fixes: a689554ba6ed ("drm/msm: Initial add DSI connector support") Signed-off-by: Dan Carpenter --- drivers/gpu/drm/msm/dsi/dsi_host.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/drivers/gpu/drm/msm/dsi/dsi_host.c b/drivers/gpu/drm/msm/dsi/dsi_host.c index c86b5090fae6..42073a562072 100644 --- a/drivers/gpu/drm/msm/dsi/dsi_host.c +++ b/drivers/gpu/drm/msm/dsi/dsi_host.c @@ -2133,8 +2133,10 @@ int msm_dsi_host_cmd_rx(struct mipi_dsi_host *host, } ret = dsi_cmds2buf_tx(msm_host, msg); - if (ret < msg->tx_len) { + if (ret < 0 || ret < msg->tx_len) { pr_err("%s: Read cmd Tx failed, %d\n", __func__, ret); + if (ret >= 0) + ret = -EIO; return ret; }