From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754878AbdKIVsj (ORCPT ); Thu, 9 Nov 2017 16:48:39 -0500 Received: from aserp1040.oracle.com ([141.146.126.69]:38097 "EHLO aserp1040.oracle.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754172AbdKIVsi (ORCPT ); Thu, 9 Nov 2017 16:48:38 -0500 Date: Fri, 10 Nov 2017 00:48:18 +0300 From: Dan Carpenter To: Colin King Cc: Greg Kroah-Hartman , Marcus Wolf , Al Viro , devel@driverdev.osuosl.org, kernel-janitors@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH] staging: pi433: fix missing break in switch statement. Message-ID: <20171109214818.r4mcizwmnmhyvo26@mwanda> References: <20171109171955.10911-1-colin.king@canonical.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20171109171955.10911-1-colin.king@canonical.com> User-Agent: NeoMutt/20170609 (1.8.3) X-Source-IP: userv0021.oracle.com [156.151.31.71] Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, Nov 09, 2017 at 05:19:55PM +0000, Colin King wrote: > From: Colin Ian King > > The PI433_IOC_WR_RX_CFG case is missing a break and will fall through > to the default case and errorenously return -EINVAL. Fix this by > adding in missing break. > Could you fix PI433_IOC_RD_RX_CFG as well? There is a missing return statement if the copy_to_user() fails we fall through to here and error out. regards, dan carpenter