From nobody Tue Dec 16 13:52:40 2025 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 vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 71E7BC4167B for ; Fri, 1 Dec 2023 03:00:29 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1377048AbjLADAU (ORCPT ); Thu, 30 Nov 2023 22:00:20 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:57782 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232135AbjLADAQ (ORCPT ); Thu, 30 Nov 2023 22:00:16 -0500 Received: from mail.nfschina.com (unknown [42.101.60.195]) by lindbergh.monkeyblade.net (Postfix) with SMTP id 97A2B171D; Thu, 30 Nov 2023 19:00:21 -0800 (PST) Received: from localhost.localdomain (unknown [180.167.10.98]) by mail.nfschina.com (Maildata Gateway V2.8.8) with ESMTPSA id 976C760105E65; Fri, 1 Dec 2023 11:00:18 +0800 (CST) X-MD-Sfrom: suhui@nfschina.com X-MD-SrcIP: 180.167.10.98 From: Su Hui To: dan.carpenter@linaro.org, hare@suse.com, jejb@linux.ibm.com, martin.petersen@oracle.com Cc: Su Hui , linux-scsi@vger.kernel.org, linux-kernel@vger.kernel.org, kernel-janitors@vger.kernel.org Subject: [PATCH v2 1/3] scsi: aic7xxx: return negative error codes in ahc_linux_register_host() Date: Fri, 1 Dec 2023 10:59:54 +0800 Message-Id: <20231201025955.1584260-2-suhui@nfschina.com> X-Mailer: git-send-email 2.30.2 In-Reply-To: <20231201025955.1584260-1-suhui@nfschina.com> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Type: text/plain; charset="utf-8" ahc_linux_register_host() return both positive and negative error code, it's better to make this function only return negative error codes. Signed-off-by: Su Hui --- drivers/scsi/aic7xxx/aic7xxx_osm.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/scsi/aic7xxx/aic7xxx_osm.c b/drivers/scsi/aic7xxx/aic7= xxx_osm.c index 4ae0a1c4d374..b0c4f2345321 100644 --- a/drivers/scsi/aic7xxx/aic7xxx_osm.c +++ b/drivers/scsi/aic7xxx/aic7xxx_osm.c @@ -1085,7 +1085,7 @@ ahc_linux_register_host(struct ahc_softc *ahc, struct= scsi_host_template *templa template->name =3D ahc->description; host =3D scsi_host_alloc(template, sizeof(struct ahc_softc *)); if (host =3D=3D NULL) - return (ENOMEM); + return -ENOMEM; =20 *((struct ahc_softc **)host->hostdata) =3D ahc; ahc->platform_data->host =3D host; --=20 2.30.2