Received: by 2002:ac0:a5b6:0:0:0:0:0 with SMTP id m51-v6csp4860007imm; Tue, 19 Jun 2018 00:44:20 -0700 (PDT) X-Google-Smtp-Source: ADUXVKK3qCOu/n6ECm/M0hwOBQeKwLAH9vl9hB0LEFGsE/ImUOqPsLP2jXTn6gAkPfOEShRSE06t X-Received: by 2002:a17:902:9681:: with SMTP id n1-v6mr14853193plp.244.1529394260268; Tue, 19 Jun 2018 00:44:20 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1529394260; cv=none; d=google.com; s=arc-20160816; b=KjtHUEPwd8596OUav3OGmSynu+g1/NyxdiKSdgiYV97MmIMpNSDe6OXrpWpDroMmSd 6lDt7RuDRWx5ybxE4pvL1NecUdAqzp6QfSB0CtrwYVM/2sO+9ydIqvfm0dJWNWv+z1wv bvCRlv0cMGFWfkNzSiVCQp/QZ5Xv8gkwN7Wy/JO+raAeUc+4GtQ2GjbaLN23dL6jp+BN FNDE2FDCKYkcU/+RBbidAiyqdvM/mT3dcIFma3fWy62IlzhpPub8kqLGOO4vI8HU77Zv cKWnOZKsuBDBTNTqgz4/eqWoNHiCOVaPAKlkCTEclPyOwcY5bszO9v+4NHlSwGJBcUmI d/wA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date:dkim-signature:arc-authentication-results; bh=0cFCnK7qB3cUIFEY95glyAX4VU2EWD49odjxtIJ3NDs=; b=riDQU6YrhUjAACw3XeNCsgSJAVLl20G0fQ+wwcUfuLbd0v2X+A5AshYDCyYAZOaTyf 6V+Qh8gcn0SSMOHFRZ8CezTUGTzXsymKzbXZ29FMfU+0j2svm1ln4tTlxMXeFhrMqIkD RG/DoLdRU22xBxD6f7zObhZSY2IZbl8q1FPUJ3gzgr6OLSHA8xhzw58RTawHgwYqUTGB dGkGMZjDEycYO5Xq9Zj1bhOI53mBEFnvVtuBvPQdCgP/piAGcWMyzYIFaDpZ44ft1tB4 p4GgWvseLdRsy++Rf/M3Ysxz3up5JlGwzh49L9KLJK7t5ccc0OHZw6HVi99zX9Y8drWB QtRQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@oracle.com header.s=corp-2017-10-26 header.b=jvdQLijh; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=oracle.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id u8-v6si15809100pfm.63.2018.06.19.00.44.06; Tue, 19 Jun 2018 00:44:20 -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; dkim=pass header.i=@oracle.com header.s=corp-2017-10-26 header.b=jvdQLijh; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=oracle.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S937314AbeFSHn3 (ORCPT + 99 others); Tue, 19 Jun 2018 03:43:29 -0400 Received: from aserp2120.oracle.com ([141.146.126.78]:34116 "EHLO aserp2120.oracle.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S937104AbeFSHn2 (ORCPT ); Tue, 19 Jun 2018 03:43:28 -0400 Received: from pps.filterd (aserp2120.oracle.com [127.0.0.1]) by aserp2120.oracle.com (8.16.0.22/8.16.0.22) with SMTP id w5J7ctVf080492; Tue, 19 Jun 2018 07:43:10 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oracle.com; h=date : from : to : cc : subject : message-id : references : mime-version : content-type : in-reply-to; s=corp-2017-10-26; bh=0cFCnK7qB3cUIFEY95glyAX4VU2EWD49odjxtIJ3NDs=; b=jvdQLijhjEA+OYKnubmW5b04R97zMr90ojA/nM7gG56xCoGKkKQYrrNuC/M3anjSHzxr G5e1gP5TU79OIeDdKNDO8FZ7dprJPa+NjG+qgQQrhFW8JRFM/bLGUpRtivs52yoreRXa Enwjo4h8NKAADPBPpwudwqsYv1vveofSiByVVSi8Mo8FVK2salV1oiUaN28crSn6TWbG DT+Bqxy+MD7BpyvSh/HR3+7PN0cdcbrfy7qgwzsPaSvRsCxEj3fwuG0yvChFPtghSP60 lFrrd2tXMLUotkLM1MX/949xERoqp1FaEOkhTiIjOivBDrSIqTHijFSf09THvTcnrely Ng== Received: from userv0022.oracle.com (userv0022.oracle.com [156.151.31.74]) by aserp2120.oracle.com with ESMTP id 2jmtgwpwhr-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Tue, 19 Jun 2018 07:43:10 +0000 Received: from aserv0122.oracle.com (aserv0122.oracle.com [141.146.126.236]) by userv0022.oracle.com (8.14.4/8.14.4) with ESMTP id w5J7h8eE028352 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Tue, 19 Jun 2018 07:43:08 GMT Received: from abhmp0011.oracle.com (abhmp0011.oracle.com [141.146.116.17]) by aserv0122.oracle.com (8.14.4/8.14.4) with ESMTP id w5J7h6Da029189; Tue, 19 Jun 2018 07:43:06 GMT Received: from mwanda (/197.157.34.185) by default (Oracle Beehive Gateway v4.0) with ESMTP ; Tue, 19 Jun 2018 00:43:06 -0700 Date: Tue, 19 Jun 2018 10:42:48 +0300 From: Dan Carpenter To: Anton Vasilyev Cc: Andy Shevchenko , devel@driverdev.osuosl.org, ldv-project@linuxtesting.org, Johannes Thumshirn , linux-kernel@vger.kernel.org, Sinan Kaya , Hannes Reinecke , Gaurav Pathak Subject: Re: your mail Message-ID: <20180619074248.ssu5kza6wdwhzdqi@mwanda> References: <20180613173128.32384-1-vasilyev@ispras.ru> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20180613173128.32384-1-vasilyev@ispras.ru> User-Agent: NeoMutt/20170609 (1.8.3) X-Proofpoint-Virus-Version: vendor=nai engine=5900 definitions=8928 signatures=668702 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 suspectscore=48 malwarescore=0 phishscore=0 bulkscore=0 spamscore=0 mlxscore=0 mlxlogscore=426 adultscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.0.1-1805220000 definitions=main-1806190089 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Thanks for this. This is a lot of work. On Wed, Jun 13, 2018 at 08:31:28PM +0300, Anton Vasilyev wrote: > diff --git a/drivers/staging/rts5208/rtsx.c b/drivers/staging/rts5208/rtsx.c > index 70e0b8623110..69e6abe14abf 100644 > --- a/drivers/staging/rts5208/rtsx.c > +++ b/drivers/staging/rts5208/rtsx.c > @@ -857,7 +857,7 @@ static int rtsx_probe(struct pci_dev *pci, > dev->chip = kzalloc(sizeof(*dev->chip), GFP_KERNEL); > if (!dev->chip) { > err = -ENOMEM; > - goto errout; > + goto chip_alloc_fail; The most recent successful allocation is scsi_host_alloc(). I was really hoping this would say something like "goto err_free_host;" or something. The naming style here is a "come from" label which doesn't say if it's going to free the scsi host or not... It turns out we don't free the the host, but we should: err_put_host: scsi_host_put(host); The kzalloc() has it's own error message built in, and all the other error paths as well so the dev_err() is not super important to me... Killing the threads seems actually really complicated so maybe we should just have a separate error paths for that. I'm not sure... regards, dan carpenter