From mboxrd@z Thu Jan 1 00:00:00 1970 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 bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 5DCD2C433F5 for ; Wed, 9 Feb 2022 11:29:42 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:Message-ID:Subject:cc:To: From:Date:Reply-To:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:In-Reply-To:References: List-Owner; bh=DcfawK8Mmkx49CbvB2zOUHNAGXnSit/dDnBIFWalo50=; b=Ck+s+YUIcLz3RV R1UnFXF+eKmVQo8Tl2S4yY9XeCm9Qq9UraTVN9FqhyJ/tF2LECojqtfetAmdZS+PKdRvJBKi8uKFO r+/LiINLbvNqX3OrB4WCpQbMxj1Atea7W7+/nRd0K62KdjuYe3t/W+L69Z8SLkeC6owrseW+1YAI0 embuKR28KoqeuwHWbhc2vtp4IWhEu0tFfWSr6qchM0d40h0kyPPYpe34CvpbqYoOjPUZN4Du0bhsY ByTipJpeRHtn4HZ0/MBT0WyqINCSahaMtWsA3wb8d+PXd9hnqut/mQbi98SNDgVcWMTWoM/PxwZha mM63+dSxLYvJoH4VpGew==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1nHl8o-00HSOT-Mi; Wed, 09 Feb 2022 11:28:06 +0000 Received: from mail3-relais-sop.national.inria.fr ([192.134.164.104]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1nHl8j-00HSNA-Ss for linux-arm-kernel@lists.infradead.org; Wed, 09 Feb 2022 11:28:04 +0000 X-IronPort-AV: E=Sophos;i="5.88,355,1635199200"; d="scan'208";a="5431179" Received: from 173.121.68.85.rev.sfr.net (HELO hadrien) ([85.68.121.173]) by mail3-relais-sop.national.inria.fr with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 09 Feb 2022 12:27:56 +0100 Date: Wed, 9 Feb 2022 12:27:55 +0100 (CET) From: Julia Lawall X-X-Sender: jll@hadrien To: Quanyang Wang , Michal Simek , Manish Narani cc: linux-arm-kernel@lists.infradead.org, kbuild-all@lists.01.org Subject: [xilinx-xlnx:xlnx_rebase_v5.15 400/872] drivers/usb/gadget/function/f_tcm.c:340:2-12: alloc with no test, possible model on line 345 (fwd) Message-ID: User-Agent: Alpine 2.22 (DEB 394 2020-01-19) MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20220209_032802_269650_CB8E0A0B X-CRM114-Status: GOOD ( 10.05 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org Hello, Please check line 342, which seems to be missing an [i]. julia ---------- Forwarded message ---------- Date: Wed, 9 Feb 2022 17:21:42 +0800 From: kernel test robot To: kbuild@lists.01.org Cc: lkp@intel.com, Julia Lawall Subject: [xilinx-xlnx:xlnx_rebase_v5.15 400/872] drivers/usb/gadget/function/f_tcm.c:340:2-12: alloc with no test, possible model on line 345 CC: kbuild-all@lists.01.org CC: linux-arm-kernel@lists.infradead.org TO: Quanyang Wang CC: Michal Simek CC: Manish Narani tree: https://github.com/Xilinx/linux-xlnx xlnx_rebase_v5.15 head: 1183ce490adb103e5e569b8ebd74c50c885ddc05 commit: 52817ef9c056b35660cd1fd8cd02c3d3603c8059 [400/872] Revert "usb: function: f_tcm: Add support for getting alt interface number" :::::: branch date: 8 days ago :::::: commit date: 8 days ago config: i386-randconfig-c021 (https://download.01.org/0day-ci/archive/20220209/202202091733.OwkhhpPA-lkp@intel.com/config) compiler: gcc-9 (Debian 9.3.0-22) 9.3.0 If you fix the issue, kindly add following tag as appropriate Reported-by: kernel test robot Reported-by: Julia Lawall cocci warnings: (new ones prefixed by >>) >> drivers/usb/gadget/function/f_tcm.c:340:2-12: alloc with no test, possible model on line 345 vim +340 drivers/usb/gadget/function/f_tcm.c c6628548acf083 Rajnikant Bhojani 2022-01-26 331 c6628548acf083 Rajnikant Bhojani 2022-01-26 332 static int alloc_cmd_resource(struct f_uas *fu, int num, struct usb_ep *ep, c6628548acf083 Rajnikant Bhojani 2022-01-26 333 void (*complete)(struct usb_ep *ep, c6628548acf083 Rajnikant Bhojani 2022-01-26 334 struct usb_request *req)) c6628548acf083 Rajnikant Bhojani 2022-01-26 335 { c6628548acf083 Rajnikant Bhojani 2022-01-26 336 int i; c6628548acf083 Rajnikant Bhojani 2022-01-26 337 c6628548acf083 Rajnikant Bhojani 2022-01-26 338 fu->ncmd = num; c6628548acf083 Rajnikant Bhojani 2022-01-26 339 for (i = 0; i < fu->ncmd; i++) { c6628548acf083 Rajnikant Bhojani 2022-01-26 @340 fu->cmd[i] = kcalloc(fu->ncmd, sizeof(struct usbg_cdb), c6628548acf083 Rajnikant Bhojani 2022-01-26 341 GFP_KERNEL); c6628548acf083 Rajnikant Bhojani 2022-01-26 342 if (!fu->cmd) c6628548acf083 Rajnikant Bhojani 2022-01-26 343 goto err_cmd; c6628548acf083 Rajnikant Bhojani 2022-01-26 344 c6628548acf083 Rajnikant Bhojani 2022-01-26 @345 fu->cmd[i]->req = usb_ep_alloc_request(ep, GFP_KERNEL); c6628548acf083 Rajnikant Bhojani 2022-01-26 346 if (!fu->cmd[i]->req) c6628548acf083 Rajnikant Bhojani 2022-01-26 347 goto err_cmd; c6628548acf083 Rajnikant Bhojani 2022-01-26 348 c6628548acf083 Rajnikant Bhojani 2022-01-26 349 fu->cmd[i]->buf = kmalloc(fu->ep_out->maxpacket, GFP_KERNEL); c6628548acf083 Rajnikant Bhojani 2022-01-26 350 if (!fu->cmd[i]->buf) c6628548acf083 Rajnikant Bhojani 2022-01-26 351 goto err_cmd; c6628548acf083 Rajnikant Bhojani 2022-01-26 352 c6628548acf083 Rajnikant Bhojani 2022-01-26 353 fu->cmd[i]->req->complete = complete; c6628548acf083 Rajnikant Bhojani 2022-01-26 354 fu->cmd[i]->req->buf = fu->cmd[i]->buf; c6628548acf083 Rajnikant Bhojani 2022-01-26 355 fu->cmd[i]->req->length = fu->ep_out->maxpacket; c6628548acf083 Rajnikant Bhojani 2022-01-26 356 fu->cmd[i]->req->context = fu; c6628548acf083 Rajnikant Bhojani 2022-01-26 357 } c6628548acf083 Rajnikant Bhojani 2022-01-26 358 c6628548acf083 Rajnikant Bhojani 2022-01-26 359 return 0; c6628548acf083 Rajnikant Bhojani 2022-01-26 360 err_cmd: c6628548acf083 Rajnikant Bhojani 2022-01-26 361 free_cmd_resource(fu, ep); c6628548acf083 Rajnikant Bhojani 2022-01-26 362 return -ENOMEM; c6628548acf083 Rajnikant Bhojani 2022-01-26 363 } c6628548acf083 Rajnikant Bhojani 2022-01-26 364 :::::: The code at line 340 was first introduced by commit :::::: c6628548acf08392524df4bdbeee080f6f5ecc43 usb: gadget: f_tcm: queue multiple commands request :::::: TO: Rajnikant Bhojani :::::: CC: Michal Simek --- 0-DAY CI Kernel Test Service, Intel Corporation https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel