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=-16.4 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_CR_TRAILER,INCLUDES_PATCH,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS, URIBL_BLOCKED autolearn=ham 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 26541C07E9C for ; Thu, 8 Jul 2021 10:12:26 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 0CAB561C17 for ; Thu, 8 Jul 2021 10:12:26 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231519AbhGHKPG (ORCPT ); Thu, 8 Jul 2021 06:15:06 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:47872 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231421AbhGHKPF (ORCPT ); Thu, 8 Jul 2021 06:15:05 -0400 Received: from mail-pg1-x533.google.com (mail-pg1-x533.google.com [IPv6:2607:f8b0:4864:20::533]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id EF69BC061574 for ; Thu, 8 Jul 2021 03:12:22 -0700 (PDT) Received: by mail-pg1-x533.google.com with SMTP id h4so5428881pgp.5 for ; Thu, 08 Jul 2021 03:12:22 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to; bh=jE27VuYVlOpCcGE27gQsr7n24gIzFqBsKr/EtxzjirM=; b=G92dwu3sSHn0hpFfWmwVWhaEJSJl1fZGJKtLaF8K9SCsn9B+SxyuB+cdrHAa41EEoe bOPKELTY0ujAr1/uUjjxq+xIFE6F987CKLcGzuKYHjUYMp+UfKO1c/i/DWXP0ShUbMXu 4eR9xAhqbcZUDGPmwY3PddJMgIsWU3LoVHfiw= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to; bh=jE27VuYVlOpCcGE27gQsr7n24gIzFqBsKr/EtxzjirM=; b=PEM4CeAbO5TkvDTTcztFc7NZh9HBZT1vmtLkGbXLkNjWLXpL0NQ3QtFINu9L/xFzof lMlyLKZ4aa1Kg5FJCiaOt8qI0JVwfpqK5V1Dg6N1pOK1uAMId29qBBRn+YF++H7dUDF/ Xe3JL9FguE8huW0X95Noi/Q0bSTdv/moP1Zx7yYLTtQd5LOlcxjThjjv/DND9RW5uRHZ uF9XCzLojIxqbKh0pgPm+fFqWUC2o2xqvxxzLjiHc+fgQAUkXKSa5lJv0UUxDxL2FRe7 YFsSSZGa5OXyvyG/mKDgrOfTlfj0Xkj7WYl8U+EdXY6SswKCvuBqOE18D1c6OEKRuTBk idCA== X-Gm-Message-State: AOAM532mbU3nOpDDyN9Vsiy6Ek5vfaTRZN2Bah+4520Pzke6rVD6VeiR pz84K4f41BzZ3MrR1wvw28mG5g== X-Google-Smtp-Source: ABdhPJw7HnJbMSz3SImDF0XLYGQVXOiCHGIGnPFgK7xXG1hDpDv9iYrxuVajKmvbZrTOqqKljUkzgA== X-Received: by 2002:a65:4903:: with SMTP id p3mr31418968pgs.402.1625739142574; Thu, 08 Jul 2021 03:12:22 -0700 (PDT) Received: from google.com ([2409:10:2e40:5100:9350:6a13:c03e:920f]) by smtp.gmail.com with ESMTPSA id y7sm2026578pfi.204.2021.07.08.03.12.19 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 08 Jul 2021 03:12:21 -0700 (PDT) Date: Thu, 8 Jul 2021 19:12:17 +0900 From: Sergey Senozhatsky To: Takashi Iwai Cc: Max Filippov , Sergey Senozhatsky , alsa-devel@alsa-project.org, Leon Romanovsky , Takashi Iwai , LKML , "Gustavo A. R. Silva" Subject: Re: ALSA: intel8x0: div by zero in snd_intel8x0_update() Message-ID: References: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On (21/07/08 11:00), Takashi Iwai wrote: > > > --- a/sound/pci/intel8x0.c > > > +++ b/sound/pci/intel8x0.c > > > @@ -694,7 +694,7 @@ static inline void snd_intel8x0_update(struct intel8x0 *chip, struct ichdev *ich > > > int status, civ, i, step; > > > int ack = 0; > > > > > > - if (!ichdev->prepared || ichdev->suspended) > > > + if (!(ichdev->prepared || ichdev->in_measurement) || ichdev->suspended) > > > > There's no ichdev::in_measurement, but if replaced with > > chip->in_measurement it indeed fixes my issue. > > One must compile the code before sending out :-< > > > So with this change: > > Tested-by: Max Filippov > > Great, thanks for quick testing, I'll prepare the fix patch now. Tested-by: Sergey Senozhatsky