Received: by 2002:a05:6358:c692:b0:131:369:b2a3 with SMTP id fe18csp5307885rwb; Mon, 31 Jul 2023 23:43:01 -0700 (PDT) X-Google-Smtp-Source: APBJJlGe3EN6QdO2K+/N42hD6wOvJcjO9jA7OEUzto5GsK2wBdyWrQLkGsiZHGHgzo9YnFbW50cD X-Received: by 2002:a17:903:1ce:b0:1b8:88c5:2d2f with SMTP id e14-20020a17090301ce00b001b888c52d2fmr13911025plh.64.1690872181628; Mon, 31 Jul 2023 23:43:01 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1690872181; cv=none; d=google.com; s=arc-20160816; b=RLpoh/+S1xD/BVevvFIFJML9nhB0DnSBbq2bClEHcV1Byo9h8CpbfD6nWx0ajMDEMf UgFP/44ZRuczLMisLTuKbI0lEs0Ijwqjhc1pt8uoMScNKLdTQCNyrxGrWySWojhArGmY flcK3tSHv1mppRWzPWti7cx/CzHKEZeLJz/FsTxVhLqTJ9ZyvghA8XD5xsyAbjORi/gw T5sDMMWvlhMfCiYQkYb5MPYA1HKQEk2w/ViNa8GIXYHWZErHnZzjmzj7zosSd+ed+QTn /dm7OZneiXVKf2eYrfx7Zrf3/Xgb30vi8cVpkE8F+cIHX8NR6AhOL9fDGlprPccsXPJk 2Xvg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=Et0y0K2d+vVjwJdOfEnIsO7SeHd2XahanE6nhjTZtyw=; fh=eGClOMi9eMDxhTqWXdqi7Gqacxh+bExWelmj8IJED2M=; b=tGlgOjAz5I2+I5aTSmlL5bjtSA8vcguoP7XQAL7hEDtzOPquh5klHBkKFT7JEA5YPq 1/btdOCEPF4A1x4af61aFb33YtIFhaY4biYUFFiVD/uRyyAEXDIRdWepqwSVH6hdGhrd BrLfsNMljOr//Vfe7clz6moFKrSLV47U+k0SW45QxD5WMKcanzrGzkDYXxwOmTAZ0O/g nZgvxjNVgm2IS/mAL9wY5t+O2x/vhRabPH2QjDz+70Gv0SOMfwZytpCqJiizfEMrG7Ur 8SQM47rFpC283lALxUvRzrWBl0Au484OmXbnsRow3Mi1zKpxlGI1v2tSCGIz+UZ9ocZx juIg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b="ZGI+j/vd"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id d9-20020a170903230900b0019c354055d0si8905832plh.304.2023.07.31.23.42.49; Mon, 31 Jul 2023 23:43:01 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b="ZGI+j/vd"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230421AbjHAFtJ (ORCPT + 99 others); Tue, 1 Aug 2023 01:49:09 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:53990 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231138AbjHAFtC (ORCPT ); Tue, 1 Aug 2023 01:49:02 -0400 Received: from mail-wr1-x431.google.com (mail-wr1-x431.google.com [IPv6:2a00:1450:4864:20::431]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 3151A1FC8 for ; Mon, 31 Jul 2023 22:48:49 -0700 (PDT) Received: by mail-wr1-x431.google.com with SMTP id ffacd0b85a97d-3175f17a7baso4706476f8f.0 for ; Mon, 31 Jul 2023 22:48:48 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1690868927; x=1691473727; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:from:to:cc:subject:date:message-id:reply-to; bh=Et0y0K2d+vVjwJdOfEnIsO7SeHd2XahanE6nhjTZtyw=; b=ZGI+j/vdjy03FGaaR+xJmI0DMD0W/H7WW0lm3ZBYDDRezadMv0/SINLUbiIcwOtcVB 6rWtQ2cJvXxRZSulEQomaoyiqBzEnpaplbDFim591uXPwyf87YmFLWNt8bAd8yRX21DL GPjKd1X6TmlAbHcj+cjT6rSO288MI/s1Ly9eRctTJkVrb4crvbJvy2HCXg0B9TwHFNog exm46xW+eeXJaPHIok5LOyVhVurfSDya4DvT5rzGQTRfvdYmYkmfRftvjki7vmeyBJze IB5E8F2VxjFjcTuEPg8Qfyk/2klnS8EVtHCoM+VIx9+1reKs06NNxqmEiizsalvFHGLR NLEg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1690868927; x=1691473727; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to; bh=Et0y0K2d+vVjwJdOfEnIsO7SeHd2XahanE6nhjTZtyw=; b=RywFGaEW1mtmp9360KzAL/SIvxjbpnMjdCHUhn4qQNGEWkBUZHk+mTPNwlJdZ73NT0 cE+pIEigiKFjg2xkKdmbJRS2FhCN2FXY0Nk/bEuBdTGjlp+hK+j4Y6U0CFT6iCZhG1Bm eCVH8ULY5bcJgJA2+wMN1gnsLpWuaB+wVLiO+UOZ4+RQSgZWL2buoZ22Z2ymuTwS2SGI eXd60VpGJ09lAC6CG3GiFqUqMuDIysi6nzNjyqqLft9sg5EUbpt7rQHBdst8Cqn781QR +BfcMAZK7vtPJ/kCEguOMR5ZBkIatpWbaGs+ciTo4IlqnM0PJx0p/4EiuLK0b8+werxF QNzQ== X-Gm-Message-State: ABy/qLaXdW6xLkQpLPU2GFEIN++ZGMRY0jZ6+WHTUgQxJww0/UkI8dGM hzsGulOUBIG0wnMVkKjL5lmzP6L1EsI3NOYK724= X-Received: by 2002:a05:6000:1808:b0:313:f395:f5a3 with SMTP id m8-20020a056000180800b00313f395f5a3mr1408315wrh.38.1690868926808; Mon, 31 Jul 2023 22:48:46 -0700 (PDT) Received: from localhost ([102.36.222.112]) by smtp.gmail.com with ESMTPSA id j4-20020a5d6184000000b003142c85fbcdsm14984240wru.11.2023.07.31.22.48.46 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 31 Jul 2023 22:48:46 -0700 (PDT) Date: Tue, 1 Aug 2023 08:48:43 +0300 From: Dan Carpenter To: Harshit Mogalapalli Cc: Tony Huang , Li-hao Kuo , Ulf Hansson , Arnd Bergmann , linux-mmc@vger.kernel.org, linux-kernel@vger.kernel.org, kernel-janitors@vger.kernel.org, error27@gmail.com Subject: Re: [PATCH next] mmc: sunplus: Fix error handling in spmmc_drv_probe() Message-ID: <042ff6f5-58d4-4e93-aa26-79411bf81c54@kadam.mountain> References: <20230801052321.1328225-1-harshit.m.mogalapalli@oracle.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20230801052321.1328225-1-harshit.m.mogalapalli@oracle.com> X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_BLOCKED, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE,URIBL_BLOCKED autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, Jul 31, 2023 at 10:23:20PM -0700, Harshit Mogalapalli wrote: > There are few issues in spmmc_drv_probe(): > > 1. When mmc allocation fails, goto is a no-op. > 2. When mmc allocation succeeds, the error paths should use goto instead > of direct return. > 3. platform_get_irq() doesn't return zero, so '<' is sufficient. > > Fix the above issues by adding goto instead of direct return, also > remove NULL check in 'probe_free_host' as we changed the goto to return > when mmc_alloc_host() fails. > > Fixes: 4e268fed8b18 ("mmc: Add mmc driver for Sunplus SP7021") > Reported-by: Dan Carpenter > Closes: https://lore.kernel.org/all/a3829ed3-d827-4b9d-827e-9cc24a3ec3bc@moroto.mountain/ > Signed-off-by: Harshit Mogalapalli > --- LGTM. Reviewed-by: Dan Carpenter regards, dan carpenter