From patchwork Thu Nov 4 08:33:17 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Wu Bo X-Patchwork-Id: 12602679 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 mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id E43A4C433EF for ; Thu, 4 Nov 2021 08:01:21 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id C6207611CB for ; Thu, 4 Nov 2021 08:01:21 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230152AbhKDID5 (ORCPT ); Thu, 4 Nov 2021 04:03:57 -0400 Received: from szxga01-in.huawei.com ([45.249.212.187]:30919 "EHLO szxga01-in.huawei.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230344AbhKDID5 (ORCPT ); Thu, 4 Nov 2021 04:03:57 -0400 Received: from dggemv704-chm.china.huawei.com (unknown [172.30.72.55]) by szxga01-in.huawei.com (SkyGuard) with ESMTP id 4HlGDX6zckzcb78; Thu, 4 Nov 2021 15:56:28 +0800 (CST) Received: from dggpeml500019.china.huawei.com (7.185.36.137) by dggemv704-chm.china.huawei.com (10.3.19.47) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2308.15; Thu, 4 Nov 2021 16:01:12 +0800 Received: from huawei.com (10.175.124.27) by dggpeml500019.china.huawei.com (7.185.36.137) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2308.15; Thu, 4 Nov 2021 16:01:12 +0800 From: Wu Bo To: CC: , , , Subject: [PATCH 0/2] add error handling support for add_disk() Date: Thu, 4 Nov 2021 16:33:17 +0800 Message-ID: <1636014799-20156-1-git-send-email-wubo40@huawei.com> X-Mailer: git-send-email 1.8.3.1 MIME-Version: 1.0 X-Originating-IP: [10.175.124.27] X-ClientProxiedBy: dggems705-chm.china.huawei.com (10.3.19.182) To dggpeml500019.china.huawei.com (7.185.36.137) X-CFilter-Loop: Reflected Precedence: bulk List-ID: X-Mailing-List: linux-block@vger.kernel.org We never checked for errors on add_disk() as this function returned void. Now that is fixed. So add error handling support for add_disk(). Wu Bo (2): brd: add error handling support for add_disk() z2ram: add error handling support for add_disk() drivers/block/brd.c | 7 ++++++- drivers/block/z2ram.c | 8 ++++++-- 2 files changed, 12 insertions(+), 3 deletions(-)