From patchwork Wed Apr 19 06:42:56 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Harshit Mogalapalli X-Patchwork-Id: 85222 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:b0ea:0:b0:3b6:4342:cba0 with SMTP id b10csp166481vqo; Wed, 19 Apr 2023 00:01:39 -0700 (PDT) X-Google-Smtp-Source: AKy350a7tYEZmHyObQqsOxi0NioRLKUyxNHLHXuLUkmkoxC3LNQ1v+o+U9VyrVSA9DOAQ/otw4Ft X-Received: by 2002:a05:6870:a182:b0:184:2399:8730 with SMTP id a2-20020a056870a18200b0018423998730mr2688830oaf.6.1681887698864; Wed, 19 Apr 2023 00:01:38 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1681887698; cv=none; d=google.com; s=arc-20160816; b=Ga5yq9DW22rTPt82qwJne6yg3GKq5zAAMKE7yfRhP/hRuMrG0FMihJ2yiF+64NOe+b /dAeVOOQa53NIl9OvYGB2FJ6bmsAREUs67CsJ3HvkM5EIDrHrY6nuIPyw/kyfpSO6BAG D1eSAAlNojvKTZl6c0VmAIJXxa7XMiJ2KYuqRP3YVJcq0TSDhwTj2FppIsRayL8w6Fby 52n/Ls8Pt0znmLF3Wx/3wmAqEqnT1+CCuYIbRawitqOW2L8ScYTjr4ybADylmVEkchdQ 0Me7EeR+gvqDYZ2a2h7tuPCzICiG73T+a2/7q6yt5hOkfhU/HSqjB8SQyh+Wnadc+bUT 9bPQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:to:content-transfer-encoding:mime-version :message-id:date:subject:cc:from:dkim-signature; bh=lBTeLt7LT0x/iBEEIHBs4tFbuRchxfp3k+pqmGKU+Pw=; b=AOCzj6+1k+iWJtXiInQRGXZUwwkBt0jjaDFs8pzOaBgl8+jo32nCWH+4HeLHb2MdyK ZYjyhLUHZtTxcUhfhw/UgbG/wQ3gxP1Utgb4tHvoMqR1Wg5kFAD7RcuyNbort0+I0PAT eVTh1UgqPNxDygFTeKStJW5ZNzGKjTLxFQ6DDjtQ34YUsxu5mccbM00j8txRnRDiqsgZ fKoGJ+YcDyDzWrzZiL+SoUAyBRBl+79Kvm2Kn+3nW4yO+LpmnSb7ailkFmsPIMcJ12eq doITg7uNfrlWmQTcwNGsaBfDLzd6gUv7XxompOFZxCjjqXmSBkmtun9RnJ6E2x0dEnrX gBQQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@oracle.com header.s=corp-2023-03-30 header.b=wToHpURw; 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=oracle.com Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id a9-20020a05687073c900b001843f99c964si13536382oan.236.2023.04.19.00.01.26; Wed, 19 Apr 2023 00:01:38 -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; dkim=fail header.i=@oracle.com header.s=corp-2023-03-30 header.b=wToHpURw; 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=oracle.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232199AbjDSGnz (ORCPT + 99 others); Wed, 19 Apr 2023 02:43:55 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:55132 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229821AbjDSGnx (ORCPT ); Wed, 19 Apr 2023 02:43:53 -0400 Received: from mx0b-00069f02.pphosted.com (mx0b-00069f02.pphosted.com [205.220.177.32]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 797EE4EDC; Tue, 18 Apr 2023 23:43:52 -0700 (PDT) Received: from pps.filterd (m0333520.ppops.net [127.0.0.1]) by mx0b-00069f02.pphosted.com (8.17.1.19/8.17.1.19) with ESMTP id 33IM7K6S031642; Wed, 19 Apr 2023 06:43:40 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oracle.com; h=from : to : cc : subject : date : message-id : mime-version : content-transfer-encoding; s=corp-2023-03-30; bh=lBTeLt7LT0x/iBEEIHBs4tFbuRchxfp3k+pqmGKU+Pw=; b=wToHpURwOR4OXKxZrS9xK7hUj37n2tgeBq59T0hYtG8MDV0WM2IQC3lMhjiv9yocD0Nn FjVVWhRYOnAqLFWYoEIXS88uxHMgdtyWFIlebvWlR6PqRcDMmUS5BSGxI1eEPTPOpsnq LWttBOT48IEL7fCO+zPpqnlW4X2l5Yx5JFqglI5of6TvWZB7JnDI09NrmPGELnqsIFKA w38VT4FZYxosfJlNcelUSC3qEVv4eZjieKSexRWQGDdIVWnLn93eec8RzS3en9ygKK7F XgvEsEqAaUaLwZjCKbddyuccsNu44LgPlpjEhabLXnwo2tW8Ifvni0pXGIIJ21tfD9K8 aA== Received: from phxpaimrmta03.imrmtpd1.prodappphxaev1.oraclevcn.com (phxpaimrmta03.appoci.oracle.com [138.1.37.129]) by mx0b-00069f02.pphosted.com (PPS) with ESMTPS id 3pykycyhs2-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Wed, 19 Apr 2023 06:43:40 +0000 Received: from pps.filterd (phxpaimrmta03.imrmtpd1.prodappphxaev1.oraclevcn.com [127.0.0.1]) by phxpaimrmta03.imrmtpd1.prodappphxaev1.oraclevcn.com (8.17.1.19/8.17.1.19) with ESMTP id 33J5oTGe037808; Wed, 19 Apr 2023 06:43:39 GMT Received: from pps.reinject (localhost [127.0.0.1]) by phxpaimrmta03.imrmtpd1.prodappphxaev1.oraclevcn.com (PPS) with ESMTPS id 3pyjc6gqkb-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Wed, 19 Apr 2023 06:43:39 +0000 Received: from phxpaimrmta03.imrmtpd1.prodappphxaev1.oraclevcn.com (phxpaimrmta03.imrmtpd1.prodappphxaev1.oraclevcn.com [127.0.0.1]) by pps.reinject (8.17.1.5/8.17.1.5) with ESMTP id 33J6hcqG034995; Wed, 19 Apr 2023 06:43:38 GMT Received: from ca-dev112.us.oracle.com (ca-dev112.us.oracle.com [10.129.136.47]) by phxpaimrmta03.imrmtpd1.prodappphxaev1.oraclevcn.com (PPS) with ESMTP id 3pyjc6gq69-1; Wed, 19 Apr 2023 06:43:38 +0000 From: Harshit Mogalapalli Cc: harshit.m.mogalapalli@oracle.com, error27@gmail.com, kernel test robot , Sathya Prakash Veerichetty , Kashyap Desai , Sumit Saxena , Sreekanth Reddy , "James E.J. Bottomley" , "Martin K. Petersen" , mpi3mr-linuxdrv.pdl@broadcom.com, linux-scsi@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH] scsi: mpi3mr: Use -ENOMEM instead of -1 in mpi3mr_expander_add() Date: Tue, 18 Apr 2023 23:42:56 -0700 Message-Id: <20230419064256.2532069-1-harshit.m.mogalapalli@oracle.com> X-Mailer: git-send-email 2.40.0 MIME-Version: 1.0 X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.254,Aquarius:18.0.942,Hydra:6.0.573,FMLib:17.11.170.22 definitions=2023-04-19_03,2023-04-18_01,2023-02-09_01 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 mlxlogscore=999 adultscore=0 spamscore=0 malwarescore=0 suspectscore=0 mlxscore=0 phishscore=0 bulkscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2303200000 definitions=main-2304190061 X-Proofpoint-GUID: ad7DWTn37xQImdXzdCNln8r3hbAjGhGn X-Proofpoint-ORIG-GUID: ad7DWTn37xQImdXzdCNln8r3hbAjGhGn X-Spam-Status: No, score=-2.8 required=5.0 tests=BAYES_00,DKIMWL_WL_MED, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_LOW, RCVD_IN_MSPIKE_H2,SPF_HELO_NONE,SPF_NONE,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net To: unlisted-recipients:; (no To-header on input) Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1763587075488151527?= X-GMAIL-MSGID: =?utf-8?q?1763587075488151527?= smatch warnings: drivers/scsi/mpi3mr/mpi3mr_transport.c:1449 mpi3mr_expander_add() warn: returning -1 instead of -ENOMEM is sloppy No functional change. Reported-by: kernel test robot Reported-by: Dan Carpenter Link: https://lore.kernel.org/r/202303202027.ZeDQE5Ug-lkp@intel.com/ Signed-off-by: Harshit Mogalapalli --- drivers/scsi/mpi3mr/mpi3mr_transport.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/scsi/mpi3mr/mpi3mr_transport.c b/drivers/scsi/mpi3mr/mpi3mr_transport.c index 4d84d5bd173f..82b55e955730 100644 --- a/drivers/scsi/mpi3mr/mpi3mr_transport.c +++ b/drivers/scsi/mpi3mr/mpi3mr_transport.c @@ -2058,7 +2058,7 @@ int mpi3mr_expander_add(struct mpi3mr_ioc *mrioc, u16 handle) sas_expander = kzalloc(sizeof(struct mpi3mr_sas_node), GFP_KERNEL); if (!sas_expander) - return -1; + return -ENOMEM; sas_expander->handle = handle; sas_expander->num_phys = expander_pg0.num_phys;