Received: by 10.223.148.5 with SMTP id 5csp7696552wrq; Thu, 18 Jan 2018 08:28:24 -0800 (PST) X-Google-Smtp-Source: ACJfBosQ+WESN/ScKnj1vhzkZJJ/p0Yu1WyggznWC0Hgz5XfH8reOzXC3ciudycPfIO3/p1y79+s X-Received: by 10.99.115.67 with SMTP id d3mr23041576pgn.223.1516292904832; Thu, 18 Jan 2018 08:28:24 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1516292904; cv=none; d=google.com; s=arc-20160816; b=VeEwK/SVchUpIJReFcyUv/ev2sjdzo3wbrjr9uXAdi1ZDOYHS3ngo1zDGN9Np622p+ raKKatHWkPWCAO2ufhGO6fqHVdWp2FUTsVh2vLHvVdDy8g/CKgZ4cVGs3zm9r5mBCOz/ pBFKfiYABndVhP05JEnXSUDoUv4A+A1o2ipRnZ19+1XbEf86xaC26s/b1fKrfV+VmGbL VnU05JWpysBAQlfBQX9sXC6EefS9dGZS0PuBMJ5lCpYEkMDj6pJFFc8aGKGZFubNwWZ3 ZBG0AaDnuFm6zuFWoqP3cVhLxNX8AghLQh6OXR+iuNMPcEo0giv71PlB0Tggvbz/cBvo US0w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :arc-authentication-results; bh=BwGUhSkTNkzmwti6iQdyo2AezoE5/6BpEhOQWIQhQCM=; b=APmzHDzRR0ZHW9tCKTW98xdSQ78jAH0Vje2FhSwkFjPcdAgGPAmdoDyAX02FCrXia+ UBdE8zWIeUNEMZCLK+DlZ35WIlObFDm6RNBUAm2+yRanrjFZVCcDIiaJJjlMQKLy4+wF IDdWC2KrTO0lNIPcu4Lpaq3IbtSoOJT67V8iJ6a8H7s55mYbI5bO+3CtXC/Rb+qVaIVO xKJN/sA707oxdau0tEmy70fxv6rxDu7H8i/XCAwEef7uvaIueqleYi3qxeM6cecX5u8f ZC9y3snDtyzwPd8yYV9vAOOL6ChZRFCwXC5q1FQQXjOLklu3Um49/BnF9JLhwX1v4JEh WdjQ== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id a63si6456312pgc.194.2018.01.18.08.28.11; Thu, 18 Jan 2018 08:28:24 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755218AbeARPwn (ORCPT + 99 others); Thu, 18 Jan 2018 10:52:43 -0500 Received: from lilium.sigma-star.at ([109.75.188.150]:57522 "EHLO lilium.sigma-star.at" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932066AbeARPwj (ORCPT ); Thu, 18 Jan 2018 10:52:39 -0500 Received: from localhost (localhost [127.0.0.1]) by lilium.sigma-star.at (Postfix) with ESMTP id 3E440181878BA; Thu, 18 Jan 2018 16:45:21 +0100 (CET) X-Virus-Scanned: amavisd-new at lilium.sigma-star.at From: Richard Weinberger To: Boris Brezillon Cc: Wei Yongjun , Artem Bityutskiy , kernel-janitors@vger.kernel.org, linux-kernel@vger.kernel.org, Marek Vasut , linux-mtd@lists.infradead.org, Cyrille Pitchen , Brian Norris , David Woodhouse Subject: Re: [PATCH -next] mtd: ubi: wl: Fix error return code in ubi_wl_init() Date: Thu, 18 Jan 2018 16:46:17 +0100 Message-ID: <1565095.G3YoHPv5dZ@blindfold> In-Reply-To: <20180118163445.5e465f90@bbrezillon> References: <1516284305-82544-1-git-send-email-weiyongjun1@huawei.com> <20180118151132.255e0173@bbrezillon> <20180118163445.5e465f90@bbrezillon> MIME-Version: 1.0 Content-Transfer-Encoding: 7Bit Content-Type: text/plain; charset="us-ascii" Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Boris, Wei Yongjun, Am Donnerstag, 18. Januar 2018, 16:34:45 CET schrieb Boris Brezillon: > On Thu, 18 Jan 2018 15:11:32 +0100 > > Boris Brezillon wrote: > > On Thu, 18 Jan 2018 15:08:01 +0100 > > > > Boris Brezillon wrote: > > > On Thu, 18 Jan 2018 14:05:05 +0000 > > > > > > Wei Yongjun wrote: > > > > Fix to return error code -ENOMEM from the kmem_cache_alloc() error > > > > handling case instead of 0, as done elsewhere in this function. > > > > > > I guess you've used a static analysis code to detect this problem, can > > > you name it in the commit message, and paste the error/warning message > > > it reported next time you submit this kind of patch. > > > > > > > Signed-off-by: Wei Yongjun > > > > > > NAck. I you read the code you'll see that err is initialized to -ENOMEM > > > here [1], so these changes are actually not needed. > > > > Sorry, just realized I was wrong. It seems that err can be overridden by > > [2]. So this patch is indeed fixing a real problem. > > > > Reviewed-by: Boris Brezillon > > Oh, and you can add: > > Fixes: f78e5623f45b ("ubi: fastmap: Erase outdated anchor PEBs during > attach") Good catch! Thanks, //richard