From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail.kernel.org ([198.145.29.99]) by bombadil.infradead.org with esmtps (Exim 4.90_1 #2 (Red Hat Linux)) id 1ggmly-0005k0-HW for linux-mtd@lists.infradead.org; Tue, 08 Jan 2019 08:30:12 +0000 From: Boris Brezillon To: Boris Brezillon , David Woodhouse , Brian Norris , Boris Brezillon , Marek Vasut , Richard Weinberger , linux-mtd@lists.infradead.org Subject: Re: [2/2] mtd: Check add_mtd_device() ret code Date: Tue, 8 Jan 2019 09:29:59 +0100 Message-Id: <20190108082959.20870-1-bbrezillon@kernel.org> In-Reply-To: <20190102143654.24362-2-bbrezillon@kernel.org> List-Id: Linux MTD discussion mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , From: Boris Brezillon On Wed, 2019-01-02 at 14:36:54 UTC, Boris Brezillon wrote: > add_mtd_device() can fail. We should always check its return value > and gracefully handle the failure case. Fix the call sites where this > not done (in mtdpart.c) and add a __must_check attribute to the > prototype to avoid this kind of mistakes. > > Signed-off-by: Boris Brezillon Applied to http://git.infradead.org/linux-mtd.git master, thanks. Boris