On Tue, Dec 13, 2016 at 01:41:24PM +0530, rahul.g4@xxxxxxxxxxx wrote: > From: Rahul Goyal <rahul.g4@xxxxxxxxxxx> > > This patch removes unnecessary goto branch > when memory unallocated. > > Signed-off-by: Rahul Goyal <rahul.g4@xxxxxxxxxxx> > --- > drivers/staging/rtl8192e/rtllib_crypt_wep.c | 4 ++-- > 1 file changed, 2 insertions(+), 2 deletions(-) > > diff --git a/drivers/staging/rtl8192e/rtllib_crypt_wep.c b/drivers/staging/rtl8192e/rtllib_crypt_wep.c > index b3343a5..2b1d2709 100644 > --- a/drivers/staging/rtl8192e/rtllib_crypt_wep.c > +++ b/drivers/staging/rtl8192e/rtllib_crypt_wep.c > @@ -37,8 +37,8 @@ static void *prism2_wep_init(int keyidx) > struct prism2_wep_data *priv; > > priv = kzalloc(sizeof(*priv), GFP_ATOMIC); > - if (priv == NULL) > - goto fail; > + if (!priv) > + return NULL; There isn't really anything in CodingStyle against these things (I am a CodingStyle author). I personally hate "goto fail" but if everyone decided to do their own personal coding style it becomes a hassle. regards, dan carpenter _______________________________________________ devel mailing list devel@xxxxxxxxxxxxxxxxxxxxxx http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel