Received: by 2002:a05:6358:53a8:b0:117:f937:c515 with SMTP id z40csp385271rwe; Tue, 18 Apr 2023 23:50:23 -0700 (PDT) X-Google-Smtp-Source: AKy350YLFyYvqgArw8TGiV9emurZLnUfMOSpu1mlLSHvI+Vm8+4A+U2c3RW/PSbrI0WWmrqgkJUf X-Received: by 2002:a05:6808:202a:b0:387:2075:59c with SMTP id q42-20020a056808202a00b003872075059cmr2910312oiw.37.1681887023541; Tue, 18 Apr 2023 23:50:23 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1681887023; cv=none; d=google.com; s=arc-20160816; b=jtWZNUkwcwcCt18FWVAfnRNEUYxKSNpBKF79RcnCj+yWDU2kVRauzF/jutLA2b4eZI 8Z8nhdOOIAF3RdMn0BaZXaMPJaJjHBXned/7Fjb3Lw0fvN2N65BH+Obluvq/FZ9F8itx 6bOtsIiisu+zWUOlW7TBT4HX6BKbr9g9fzdS5FIBYtIj8PSkwGkAo94bRC7r1FNyOZD2 8gedSiqC1ZC/z46dld3McZuMmfaVHdQgxyqIuCLNV9Id+EKnubCphomAILIQFCck8zjg U+B2Zx9mLjAbNIJz8nwF4rZNCHW4Zinv25YRpAhZHCAgtFVtVbDmK4wik3kpNh1lXTKd 1XKw== 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 Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id ay13-20020a056808300d00b0038e500fd4e6si673131oib.241.2023.04.18.23.50.08; Tue, 18 Apr 2023 23:50:23 -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 S232177AbjDSGnz (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 Content-Transfer-Encoding: 8bit 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 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; -- 2.38.1