From patchwork Wed Sep 13 07:32:16 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Allen X-Patchwork-Id: 9950545 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 8C13D6038F for ; Wed, 13 Sep 2017 07:35:10 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 7DF13288F1 for ; Wed, 13 Sep 2017 07:35:10 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 72E9528C28; Wed, 13 Sep 2017 07:35:10 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-1.5 required=2.0 tests=BAYES_00, DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED, FREEMAIL_FROM, RCVD_IN_DNSWL_HI, RCVD_IN_SBL_CSS, RCVD_IN_SORBS_SPAM, RCVD_IN_SORBS_WEB,T_DKIM_INVALID autolearn=no version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 2370B288F1 for ; Wed, 13 Sep 2017 07:35:10 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751970AbdIMHfC (ORCPT ); Wed, 13 Sep 2017 03:35:02 -0400 Received: from mail-pg0-f68.google.com ([74.125.83.68]:37222 "EHLO mail-pg0-f68.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751250AbdIMHc7 (ORCPT ); Wed, 13 Sep 2017 03:32:59 -0400 Received: by mail-pg0-f68.google.com with SMTP id v5so7285174pgn.4; Wed, 13 Sep 2017 00:32:58 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=Ycn7HxFEr19cij7M2qkLLZMQUR7mbhbRTj1YhdDVIJA=; b=iO+66tAX+0Hc8Ph/63R5N5++Z3+1k0Dx8yCuDn6l87L4vBREf840qb58ttSeVqNOSv FuE5FKS15fYwQIQN/6n+FjRkjxvNi5pHn9GUlr8pRnPAH6RmlIC6VX+Mj2fXb0uvKx7S l/ROqcEKBEMM7uoW7X+Kl7WGXzSseTPpYOEOLaaf8YKcLgKJMQlKQ7m36aS9JC6xqELq o95OjrYE8rubxjxi8FluHKwQ2dgMyNxlgy6S+K3wvhgGGkp9+zB7pV263SMqWhcX49vN MQ8Q2iTTqrt+ESvAIKtY9ftBEDd94w82LsG43dKQUmsE/Az3e4k+dLGIaOxDlDSdMh3W 24og== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=Ycn7HxFEr19cij7M2qkLLZMQUR7mbhbRTj1YhdDVIJA=; b=bqKf6vbsowHyoMmk6CM7ym07x2djd2WHFs11CKQgftvex88yRJ1mwo0u/1tSypgBm5 tAk1XcskVwHp5vYy+hmkY8EfMb3nzW150/hhE/nP8hFw4Tq+ZB8/WSb9EFph2tUyrHS8 LFNITGfTVqeo6CBGt+GDDcdLRr8e/FMRx0iL72Uen9GQRx03hlCo64+jdK6U9jWVBug3 dkTLgLNRdmBmG9MdjdBMUPe8dPj8aNXyVZcBXh1SWy8SF2aZYc8uwNyNjQ045bTSzs2l Cwk1c4M+0h2th00jwuKDgrM2JU/OAx1w6KhurNzVGOTVnDkb7rTYULlLqPrq5nWBbsg0 PZ+w== X-Gm-Message-State: AHPjjUj+nVd2+ZJt1pcxJ2EygpK8UxgjHHmH7r5qNXyejuBd6cjScdHz bKr/f/VAgjp1gTE4FeJrJQ== X-Google-Smtp-Source: AOwi7QBIBAnIQL2NfvkDlknmurOdDxOw6rbkFtDwtUxeq0V+TmPurJY2F6QCyUom770bnNOg4uSSUQ== X-Received: by 10.99.143.14 with SMTP id n14mr5551088pgd.107.1505287978210; Wed, 13 Sep 2017 00:32:58 -0700 (PDT) Received: from localhost.localdomain ([103.42.74.194]) by smtp.gmail.com with ESMTPSA id u12sm17997328pfg.146.2017.09.13.00.32.54 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Wed, 13 Sep 2017 00:32:57 -0700 (PDT) From: Allen Pais To: linux-kernel@vger.kernel.org Cc: nouveau@lists.freedesktop.org, linux-crypto@vger.kernel.org, dri-devel@lists.freedesktop.org, MPT-FusionLinux.pdl@broadcom.com, linux-scsi@vger.kernel.org, netdev@vger.kernel.org, megaraidlinux.pdl@broadcom.com, target-devel@vger.kernel.org, linux-fbdev@vger.kernel.org, linux-btrfs@vger.kernel.org, Allen Pais Subject: [PATCH 07/10] driver:megaraid: return -ENOMEM on allocation failure. Date: Wed, 13 Sep 2017 13:02:16 +0530 Message-Id: <1505287939-14106-7-git-send-email-allen.lkml@gmail.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1505287939-14106-1-git-send-email-allen.lkml@gmail.com> References: <1505287939-14106-1-git-send-email-allen.lkml@gmail.com> Sender: target-devel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: target-devel@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP Signed-off-by: Allen Pais --- drivers/scsi/megaraid/megaraid_mbox.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/scsi/megaraid/megaraid_mbox.c b/drivers/scsi/megaraid/megaraid_mbox.c index ec3c438..b09a0a6 100644 --- a/drivers/scsi/megaraid/megaraid_mbox.c +++ b/drivers/scsi/megaraid/megaraid_mbox.c @@ -724,8 +724,8 @@ megaraid_init_mbox(adapter_t *adapter) * controllers */ raid_dev = kzalloc(sizeof(mraid_device_t), GFP_KERNEL); - if (raid_dev == NULL) return -1; - + if (!raid_dev) + return -ENOMEM; /* * Attach the adapter soft state to raid device soft state