Received: by 2002:ac0:a5b6:0:0:0:0:0 with SMTP id m51-v6csp2117207imm; Thu, 14 Jun 2018 09:01:22 -0700 (PDT) X-Google-Smtp-Source: ADUXVKJ6qE3WahZmJdKZ7vgZ0T0N6IBKejfc53rqaXzJi5PJ9yT7rqYc0KNGasyVNF+RnHegKnj5 X-Received: by 2002:a17:902:8d85:: with SMTP id v5-v6mr3648209plo.93.1528992082639; Thu, 14 Jun 2018 09:01:22 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1528992082; cv=none; d=google.com; s=arc-20160816; b=G6lUwUl5v+EF4PqotAo6SFXS3Baoq3pVHg5fRcdZ2+VP5Pbaa1AkZCQqHvRjmyes5w HaDdkD1ZPjVowHe48qtkt2oJilcQVY801izFij3nDMosAiE7KAywpXNWFSKFTGiZRZLe Imu29vn6AqEW+kW5x7Mwnt1X64KmtGrcykfOj41Ao6TPHWH9vJfQvokM8q10iSA6zuVL tIyucYApinlu8YfOz9nKC9Jem+W/tF2jRgXOr0/2CEOrfJT7BBxGucwdqw/bfe2kZnmJ hC5JQLEAUM0LX1WT4dk2x1f6vHuILDV8/BIbjwT/WKgP5aU/pVmukpAg8jieiYBCW2MX Im5A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:user-agent:references :in-reply-to:subject:cc:to:from:message-id:date :arc-authentication-results; bh=HDpR0FBHyjPiE1DyJ+jv3mvZsfEbjoqz/Pnl9Qq9XL8=; b=i46xOiHrAtv5kSySy31Lzoyuokp4AYxOylohTpz0+DQ6L0+C2bRZ/pXMRBDFEr3AV3 i6iBwvMHKy+VVUZJc30JHph/laEKVNB375KlpHsoloz/68J6PmSZ//6rMB4NpMPlFTb5 mMqW3zsJrk+uZo4Fz148TpBJsU9pm/5Pwtq/pSfv8YwFx5LYOmSiF8MXn0uZeFQ8Z9OZ jR5fl+6yyOQ9OjoqSL03FBnrs1Tx1aN2TTnl+korGJv8JySKKyNZV0xZ9xDjmUPYHf+t vwm+ndH/Pt0kdfB+1hIxJE6ofgjKAucny0XjeoP9qhRtL5TmxmLqROJq7chEUPA0Gr7m q3NQ== 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 f4-v6si5576181plo.226.2018.06.14.09.01.07; Thu, 14 Jun 2018 09:01:22 -0700 (PDT) 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 S1755238AbeFNQAn (ORCPT + 99 others); Thu, 14 Jun 2018 12:00:43 -0400 Received: from mx2.suse.de ([195.135.220.15]:40662 "EHLO mx2.suse.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754965AbeFNQAn (ORCPT ); Thu, 14 Jun 2018 12:00:43 -0400 X-Virus-Scanned: by amavisd-new at test-mx.suse.de Received: from relay1.suse.de (charybdis-ext-too.suse.de [195.135.220.254]) by mx2.suse.de (Postfix) with ESMTP id DEFA2AF75; Thu, 14 Jun 2018 16:00:41 +0000 (UTC) Date: Thu, 14 Jun 2018 18:00:41 +0200 Message-ID: From: Takashi Iwai To: "Zhouyang Jia" Cc: , "Bhumika Goyal" , "Jaroslav Kysela" , Subject: Re: [PATCH v3] ALSA: sonicvibes: add error handling for snd_ctl_add In-Reply-To: <1528976499-52071-1-git-send-email-jiazhouyang09@gmail.com> References: <1528704521-34060-1-git-send-email-jiazhouyang09@gmail.com> <1528976499-52071-1-git-send-email-jiazhouyang09@gmail.com> User-Agent: Wanderlust/2.15.9 (Almost Unreal) SEMI/1.14.6 (Maruoka) FLIM/1.14.9 (=?UTF-8?B?R29qxY0=?=) APEL/10.8 Emacs/25.3 (x86_64-suse-linux-gnu) MULE/6.0 (HANACHIRUSATO) MIME-Version: 1.0 (generated by SEMI 1.14.6 - "Maruoka") 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 On Thu, 14 Jun 2018 13:41:37 +0200, Zhouyang Jia wrote: > > When snd_ctl_add fails, the lack of error-handling code may > cause unexpected results. > > This patch adds error-handling code after calling snd_ctl_add. > > Signed-off-by: Zhouyang Jia > --- > v1->v2: > - Check the return value of snd_sonicvibes_create_gameport. > v2->v3: > - Fix the code style. Applied, thanks. Takashi