From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-3.8 required=3.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id A840BC12002 for ; Wed, 21 Jul 2021 12:15:44 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 791D26120E for ; Wed, 21 Jul 2021 12:15:44 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232684AbhGULfE (ORCPT ); Wed, 21 Jul 2021 07:35:04 -0400 Received: from mga17.intel.com ([192.55.52.151]:43837 "EHLO mga17.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231680AbhGULfE (ORCPT ); Wed, 21 Jul 2021 07:35:04 -0400 X-IronPort-AV: E=McAfee;i="6200,9189,10051"; a="191699401" X-IronPort-AV: E=Sophos;i="5.84,258,1620716400"; d="scan'208";a="191699401" Received: from orsmga004.jf.intel.com ([10.7.209.38]) by fmsmga107.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 21 Jul 2021 05:15:40 -0700 X-IronPort-AV: E=Sophos;i="5.84,258,1620716400"; d="scan'208";a="564724111" Received: from smile.fi.intel.com (HELO smile) ([10.237.68.40]) by orsmga004-auth.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 21 Jul 2021 05:15:39 -0700 Received: from andy by smile with local (Exim 4.94.2) (envelope-from ) id 1m6B8P-00Gd8J-Cb; Wed, 21 Jul 2021 15:15:33 +0300 Date: Wed, 21 Jul 2021 15:15:33 +0300 From: Andy Shevchenko To: Dan Carpenter Cc: linux-spi@vger.kernel.org Subject: Re: [bug report] spi: pxa2xx: Reuse int_stop_and_reset() in couple of places Message-ID: References: <20210721113246.GA24694@kili> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20210721113246.GA24694@kili> Organization: Intel Finland Oy - BIC 0357606-4 - Westendinkatu 7, 02160 Espoo Precedence: bulk List-ID: X-Mailing-List: linux-spi@vger.kernel.org On Wed, Jul 21, 2021 at 04:32:46AM -0700, Dan Carpenter wrote: > Hello Andy Shevchenko, > > The patch 3bbdc083262d: "spi: pxa2xx: Reuse int_stop_and_reset() in > couple of places" from Jul 19, 2021, leads to the following static > checker warning: > > drivers/spi/spi-pxa2xx.c:774 ssp_int() > error: we previously assumed 'drv_data->controller->cur_msg' could be null (see line 773) > 773 if (!drv_data->controller->cur_msg) { > --> 774 handle_bad_msg(drv_data); > ^^^^^^^^^^^^^^^^^^^^^^^^ > We can't reset with a NULL drv_data->controller->cur_msg. We can if we handle this inside reset_sccr1() properly. Thanks for the report and patch on its way! -- With Best Regards, Andy Shevchenko