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=-4.0 required=3.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI, SIGNED_OFF_BY,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 118ADC43331 for ; Mon, 30 Mar 2020 21:06:52 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id D527720757 for ; Mon, 30 Mar 2020 21:06:51 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (1024-bit key) header.d=redhat.com header.i=@redhat.com header.b="O6mWpXNn" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728930AbgC3VGu (ORCPT ); Mon, 30 Mar 2020 17:06:50 -0400 Received: from us-smtp-delivery-74.mimecast.com ([216.205.24.74]:45333 "EHLO us-smtp-delivery-74.mimecast.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728370AbgC3VGu (ORCPT ); Mon, 30 Mar 2020 17:06:50 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1585602410; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=O5orfkpIWxG4X0fim40qmaOHzOaHEPG36AFc1Y+7h+M=; b=O6mWpXNnwpSfjsw+G7L4E8era2vUJYSlFo5Y+LKQGkjzrh6++mtgrhUsfx/zzbz2yCk9BO 4wxPsR6zp+lBdKulFZcg12eTHaG22LVDmI2eFa6YvMwyh8Fw/i2kSv7y3MhOZ3liDLTQZX N0gaXPQ0FQMecRel0ZALJa3fnnkr73M= Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-367-H3ehbNgZPFCmGVZexGte0w-1; Mon, 30 Mar 2020 17:06:48 -0400 X-MC-Unique: H3ehbNgZPFCmGVZexGte0w-1 Received: from smtp.corp.redhat.com (int-mx03.intmail.prod.int.phx2.redhat.com [10.5.11.13]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 275CA18A6EC0; Mon, 30 Mar 2020 21:06:46 +0000 (UTC) Received: from elisabeth (unknown [10.36.110.18]) by smtp.corp.redhat.com (Postfix) with ESMTPS id A26CA48; Mon, 30 Mar 2020 21:06:42 +0000 (UTC) Date: Mon, 30 Mar 2020 23:06:34 +0200 From: Stefano Brivio To: "John B. Wyatt IV" Cc: outreachy-kernel@googlegroups.com, Julia Lawall , Forest Bond , Greg Kroah-Hartman , Quentin Deslandes , Colin Ian King , Malcolm Priestley , devel@driverdev.osuosl.org, linux-kernel@vger.kernel.org Subject: Re: [Outreachy kernel] [PATCH v5] staging: vt6656: add error code handling to unused variable Message-ID: <20200330230634.3b905158@elisabeth> In-Reply-To: <20200330184517.33074-1-jbwyatt4@gmail.com> References: <20200330184517.33074-1-jbwyatt4@gmail.com> Organization: Red Hat MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-Scanned-By: MIMEDefang 2.79 on 10.5.11.13 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, 30 Mar 2020 11:45:17 -0700 "John B. Wyatt IV" wrote: > Add error code handling to unused 'ret' variable that was never used. > Return an error code from functions called within vnt_radio_power_on. > > Issue reported by coccinelle (coccicheck). > > Suggested-by: Quentin Deslandes > Suggested-by: Stefano Brivio > Reviewed-by: Quentin Deslandes > Signed-off-by: John B. Wyatt IV > --- > v5: Remove Suggested-by: Julia Lawall above seperator line. > Remove break; statement in switch block. > break; removal checked by both gcc compile and checkpatch. > > [...] > > @@ -734,14 +738,15 @@ int vnt_radio_power_on(struct vnt_private *priv) > case RF_VT3226: > case RF_VT3226D0: > case RF_VT3342A0: > - vnt_mac_reg_bits_on(priv, MAC_REG_SOFTPWRCTL, > - (SOFTPWRCTL_SWPE2 | SOFTPWRCTL_SWPE3)); > + ret = vnt_mac_reg_bits_on(priv, MAC_REG_SOFTPWRCTL, > + (SOFTPWRCTL_SWPE2 | > + SOFTPWRCTL_SWPE3)); > break; > } > + if (ret) > + return ret; Did you send the wrong version perhaps? -- Stefano