Return-path: Received: from mail-it0-f51.google.com ([209.85.214.51]:37000 "EHLO mail-it0-f51.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1757122AbcG1MCt (ORCPT ); Thu, 28 Jul 2016 08:02:49 -0400 MIME-Version: 1.0 In-Reply-To: <590e0614-db41-a193-5463-9e3ad2630489@users.sourceforge.net> References: <5307CAA2.8060406@users.sourceforge.net> <530A086E.8010901@users.sourceforge.net> <530A72AA.3000601@users.sourceforge.net> <530B5FB6.6010207@users.sourceforge.net> <530C5E18.1020800@users.sourceforge.net> <530CD2C4.4050903@users.sourceforge.net> <530CF8FF.8080600@users.sourceforge.net> <530DD06F.4090703@users.sourceforge.net> <5317A59D.4@users.sourceforge.net> <558EB32E.6090003@users.sourceforge.net> <590e0614-db41-a193-5463-9e3ad2630489@users.sourceforge.net> From: Julian Calaby Date: Thu, 28 Jul 2016 22:02:29 +1000 Message-ID: (sfid-20160728_140313_092680_E7B26F51) Subject: Re: [PATCH 2/3] staging: wilc1000: One function call less in mac_ioctl() after error detection To: SF Markus Elfring Cc: linux-wireless , "devel@driverdev.osuosl.org" , Austin Shin , Chris Park , Glen Lee , Greg Kroah-Hartman , Johnny Kim , Leo Kim , Tony Cho , LKML , kernel-janitors , Julia Lawall Content-Type: text/plain; charset=UTF-8 Sender: linux-wireless-owner@vger.kernel.org List-ID: Hi Marcus, On Mon, Jul 25, 2016 at 6:22 AM, SF Markus Elfring wrote: > From: Markus Elfring > Date: Sun, 24 Jul 2016 21:15:23 +0200 > > The kfree() function was called in two cases by the mac_ioctl() function > during error handling even if the passed variable did not contain a pointer > for a valid data item. > > Improve this implementation detail by the introduction of another > jump label. > > Signed-off-by: Markus Elfring This is pointless micro-optimisation: kfree(NULL) is perfectly valid and buff is either malloc'd memory or NULL when it's called. Thanks, -- Julian Calaby Email: julian.calaby@gmail.com Profile: http://www.google.com/profiles/julian.calaby/