Received: by 2002:a25:868d:0:0:0:0:0 with SMTP id z13csp1136949ybk; Thu, 14 May 2020 01:06:53 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyvAZemQ8CF0UyDBGoXqtJE7h2+vm+BdG8UM2PFMWJEeEfWRn1gz4bxXL1rrJOfWUuDx4qd X-Received: by 2002:a50:9b58:: with SMTP id a24mr2655960edj.256.1589443613115; Thu, 14 May 2020 01:06:53 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1589443613; cv=none; d=google.com; s=arc-20160816; b=kXaTDHcEwp6WgsgYZk8wsE/t9Svse8A/zOcKhqtJiud4ImJyYIY62RtDs0+oIkfIqW VNoJ+gMe/YaaMkbWRmiXUUXmXaJf7JSbl71s0p+BvCtHqjNMfJxOuBzwmiS07jQ1mjA3 mgr5uxS+IVHyqe+HppctaAHti8Ht69J4u7BntWqiXvH9ysQPlbQTygSi2xtNyrJC1ZOP /SJvO6xA64vpPL/2gsl5Ycfz5mM4ZESyY/gnl91sXzd7+7m7Qo7I65gwEffyXhprVvCz BwCkuQjr04jLYetp2TNqkYPcs9J1EpOGNsPbFJFq43Df0h+yrhzJDyZ0omaks2tqUly9 h+Mg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :message-id:date:subject:cc:to:from:dkim-signature; bh=mrYggCzs9Es3fAAe5f56aAmDrVDKZRIo+656NWVNAmE=; b=sXcv6H64TwJNOciUQhvR07svXdinldMjvsrYtVp3JFz6xvSOCyq2EIFGoGkvLQuS7Z vkRR3bVegdr6QlQa8BwJ3vre6HFNel3fEPl8ww4pvhlgIwJRL4a+k7njOgt1AvQhcwlZ YcYQh9FtCKe+uY/Tk2lO3EGuuhuJcNPzujeY7a+28B+4Za1qZjFhtjI+55wyzyDmCM7+ 9a0TbizKx2g6UuJldW1uXuAIPKhrKWdmwHdiGlv5KKvkQ8TCs5xtJdbAnNlIRAiPzR+I hBn23l3URW/0zkB3qNbvmiO4wmXjYYt3GzkA0nn29OwFhs9JSY3/1tJLyTQ18l68uEUW UWRA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@mediatek.com header.s=dk header.b=fkyRCUsu; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=mediatek.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id j14si757242ejy.206.2020.05.14.01.06.30; Thu, 14 May 2020 01:06:53 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@mediatek.com header.s=dk header.b=fkyRCUsu; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=mediatek.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726070AbgENIFJ (ORCPT + 99 others); Thu, 14 May 2020 04:05:09 -0400 Received: from mailgw02.mediatek.com ([210.61.82.184]:26663 "EHLO mailgw02.mediatek.com" rhost-flags-OK-FAIL-OK-FAIL) by vger.kernel.org with ESMTP id S1725935AbgENIFJ (ORCPT ); Thu, 14 May 2020 04:05:09 -0400 X-UUID: 4fb1093cbcec4f18b37bac5a7521f79b-20200514 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=mediatek.com; s=dk; h=Content-Transfer-Encoding:Content-Type:MIME-Version:Message-ID:Date:Subject:CC:To:From; bh=mrYggCzs9Es3fAAe5f56aAmDrVDKZRIo+656NWVNAmE=; b=fkyRCUsuWECnwmFc3f1cZXB24o/Glfzc2EQM5fLKOFMBPDIK7BEpRcyM51QiQdYGDlwyCu8ufO+euJxRm6XqxY4Tdfa0UAbehr5MPvGAjBbSTuEbh6x/h6T9MlrGz4bNaohU7K9pW4WKg3suI9K2fx3fHwhOA2Ur1pi+Kv2jq8A=; X-UUID: 4fb1093cbcec4f18b37bac5a7521f79b-20200514 Received: from mtkcas10.mediatek.inc [(172.21.101.39)] by mailgw02.mediatek.com (envelope-from ) (Cellopoint E-mail Firewall v4.1.10 Build 0809 with TLS) with ESMTP id 930876128; Thu, 14 May 2020 16:05:05 +0800 Received: from MTKCAS06.mediatek.inc (172.21.101.30) by mtkmbs08n1.mediatek.inc (172.21.101.55) with Microsoft SMTP Server (TLS) id 15.0.1497.2; Thu, 14 May 2020 16:05:01 +0800 Received: from mtkswgap22.mediatek.inc (172.21.77.33) by MTKCAS06.mediatek.inc (172.21.101.73) with Microsoft SMTP Server id 15.0.1497.2 via Frontend Transport; Thu, 14 May 2020 16:05:01 +0800 From: Macpaul Lin To: Felipe Balbi , Greg Kroah-Hartman , Matthias Brugger , =?UTF-8?q?Micha=C5=82=20Miros=C5=82aw?= , Sergey Organov , Macpaul Lin , , , , CC: Mediatek WSD Upstream , Macpaul Lin , Stan Lu Subject: [PATCH] usb: gadget: u_serial: fix coverity warning: negative index at array Date: Thu, 14 May 2020 16:05:00 +0800 Message-ID: <1589443500-3990-1-git-send-email-macpaul.lin@mediatek.com> X-Mailer: git-send-email 1.7.9.5 MIME-Version: 1.0 Content-Type: text/plain X-MTK: N Content-Transfer-Encoding: base64 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org VGhpcyBpc3N1ZSBoYXMgYmVlbiByZXBvcnRlZCBieSBjb3Zlcml0eSBzY2FubmVyLg0KUmVwbGFj ZSAiaW50IHBvcnRudW0iIGJ5ICJ1bnNpZ25lZCBpbnQiLCB0aGlzIHZvaWQgbmVnYXRpdmUgaW5k ZXggYXQNCmFycmF5Lg0KDQpTaWduZWQtb2ZmLWJ5OiBTdGFu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