Received: by 2002:a6b:fb09:0:0:0:0:0 with SMTP id h9csp144189iog; Fri, 24 Jun 2022 00:43:55 -0700 (PDT) X-Google-Smtp-Source: AGRyM1ss9Nyu41PH/Plmkr7cxEaonqVJtbHyooy1PWzEbiMcTKXeJyWsY5S31yJfgEcMfiwSHQIQ X-Received: by 2002:a17:907:761c:b0:6d6:e553:7bd1 with SMTP id jx28-20020a170907761c00b006d6e5537bd1mr11947109ejc.5.1656056634829; Fri, 24 Jun 2022 00:43:54 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1656056634; cv=none; d=google.com; s=arc-20160816; b=ySbQ/P4dJcdRPtNcj/sJJnekdgzgzLfxwszZuNosj+H3Or8KoUIVS6DLuX588SNj+D LfJhSdsCbnuBkPomQVBU93oospDbVhG79DnPIV+bvM/HwND+osoQjq6KuimFU8+nFE/V GoxiuLZTrThuFqJzor7eYLdMKbdlMqC40+9mE1+8dG5JJV26U9vyKQ9doDCIdPXk3GP4 z/pR2I1KXjCeFh04CKUg6qygxyDVeIlnCVwzJyr0pPkYMuYUODdPfoJcPIE05ELY6+9V OmAK/9ypVNruojc3zml+/G8INZ0Pf/QNxJ5KTagRPI5thUDxxX19ABHkli30ANufjR94 iB3Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :message-id:date:subject:cc:to:from; bh=9TtGc8c3cZoCwkkeJDTr+FE8Ymg90SlXASfFSydFgQM=; b=gTOWp4mpyeAX0DffeIFweQvrhRLlH58zxVZ+m8KBAjvs3dTpdJuaH/tJamR8aRNGZn yJCcc+YVHJwSP+4TOJCwJ/alunq/jcMmXsozUDNGViHslMGvDj8oUD8opYTBhT5yVv8l OU3ves8Mi280m6OTpb3qUu9+pzveyoFaJ3jfCNjpChfPtDOu/GeluqQtDEWTuAqA84qX 0uuLDDa5hGnVqqR8eKeuVqN4sdsHGrImZJnJhcPRVjA8Y8YF5KeINvLEGzKfcGXQ7lwp xONbMxFhfR3VL3zbMqf/kvNE8nvBNxEKzE6eSK8HWlFZWgGnFfia26eN/qUuIyOk9YfV Pkog== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=alibaba.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id f2-20020a50d542000000b0043555742fb6si2124371edj.224.2022.06.24.00.43.30; Fri, 24 Jun 2022 00:43:54 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=alibaba.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230152AbiFXHZo (ORCPT + 99 others); Fri, 24 Jun 2022 03:25:44 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:52438 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229587AbiFXHZn (ORCPT ); Fri, 24 Jun 2022 03:25:43 -0400 Received: from out199-14.us.a.mail.aliyun.com (out199-14.us.a.mail.aliyun.com [47.90.199.14]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 89BEF4CD41; Fri, 24 Jun 2022 00:25:41 -0700 (PDT) X-Alimail-AntiSpam: AC=PASS;BC=-1|-1;BR=01201311R161e4;CH=green;DM=||false|;DS=||;FP=0|-1|-1|-1|0|-1|-1|-1;HT=ay29a033018045170;MF=jiapeng.chong@linux.alibaba.com;NM=1;PH=DS;RN=8;SR=0;TI=SMTPD_---0VHG5rQQ_1656055517; Received: from localhost(mailfrom:jiapeng.chong@linux.alibaba.com fp:SMTPD_---0VHG5rQQ_1656055517) by smtp.aliyun-inc.com; Fri, 24 Jun 2022 15:25:37 +0800 From: Jiapeng Chong To: lewis.hanly@microchip.com Cc: conor.dooley@microchip.com, b-liu@ti.com, gregkh@linuxfoundation.org, linux-riscv@lists.infradead.org, linux-usb@vger.kernel.org, linux-kernel@vger.kernel.org, Jiapeng Chong Subject: [PATCH] usb: musb: Fix missing error code in mpfs_probe() Date: Fri, 24 Jun 2022 15:25:15 +0800 Message-Id: <20220624072515.123646-1-jiapeng.chong@linux.alibaba.com> X-Mailer: git-send-email 2.20.1.7.g153144c MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-9.9 required=5.0 tests=BAYES_00, ENV_AND_HDR_SPF_MATCH,SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE, UNPARSEABLE_RELAY,USER_IN_DEF_SPF_WL autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org The error code is missing in this code scenario, add the error code '-ENOMEM' to the return value 'ret'. This was found by coccicheck: drivers/usb/musb/mpfs.c:185 mpfs_probe() warn: missing error code 'ret'. Signed-off-by: Jiapeng Chong --- drivers/usb/musb/mpfs.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/drivers/usb/musb/mpfs.c b/drivers/usb/musb/mpfs.c index 99666ef8af06..c8bf6570bcc4 100644 --- a/drivers/usb/musb/mpfs.c +++ b/drivers/usb/musb/mpfs.c @@ -181,8 +181,10 @@ static int mpfs_probe(struct platform_device *pdev) glue->clk = clk; pdata = devm_kzalloc(dev, sizeof(*pdata), GFP_KERNEL); - if (!pdata) + if (!pdata) { + ret = -ENOMEM; goto err_clk_disable; + } pdata->config = &mpfs_musb_hdrc_config; pdata->platform_ops = &mpfs_ops; -- 2.20.1.7.g153144c