From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751154AbbKNHIX (ORCPT ); Sat, 14 Nov 2015 02:08:23 -0500 Received: from mail-pa0-f51.google.com ([209.85.220.51]:36728 "EHLO mail-pa0-f51.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750901AbbKNHIV (ORCPT ); Sat, 14 Nov 2015 02:08:21 -0500 Date: Sat, 14 Nov 2015 12:38:15 +0530 From: Sudip Mukherjee To: Anjali Menon Cc: gregkh@linuxfoundation.org, devel@driverdev.osuosl.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH] staging: most: aim-cdev: Used "==" instead of assignment Message-ID: <20151114070815.GD3685@sudip-pc> References: <1447475230-3678-1-git-send-email-cse.anjalimenon@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1447475230-3678-1-git-send-email-cse.anjalimenon@gmail.com> User-Agent: Mutt/1.5.21 (2010-09-15) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Sat, Nov 14, 2015 at 09:57:10AM +0530, Anjali Menon wrote: > Used double equal sign instead of equal to sign in the if condition > to remove the error detected by checkpatch.pl. > > ERROR: do not use assignment in if condition > > Signed-off-by: Anjali Menon > --- > drivers/staging/staging/drivers/staging/most/aim-cdev/cdev.c | 2 +- something wrong with your tree. This path doesnot exist. But in any case, i think the patch is wrong. wait_event_interruptible() is executed when most_get_mbo() returns NULL. so if you do mbo == most_get_mbo() it will immediately come out of sleep as the condition is true. I think here the intention was to sleep as long as most_get_mbo() returns NULL. And when it returns a valid pointer it is saved in mbo variable so that it can be used later in copy_from_user(). regards sudip