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=-0.8 required=3.0 tests=HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI autolearn=unavailable autolearn_force=no version=3.4.0 Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by aws-us-west-2-korg-lkml-1.web.codeaurora.org (Postfix) with ESMTP id 6E431C07D5C for ; Thu, 14 Jun 2018 16:00:46 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 25864208C3 for ; Thu, 14 Jun 2018 16:00:46 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 25864208C3 Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=suse.de Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755278AbeFNQAo (ORCPT ); Thu, 14 Jun 2018 12:00:44 -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