lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CAO3upoaJ8R9svW1kTOu6aGdRpPzjM0i6+YL0YV29xCDwvgSqjA@mail.gmail.com>
Date:   Mon, 16 Jul 2018 14:28:24 -0700
From:   Todd Poynor <toddpoynor@...il.com>
To:     Greg Kroah-Hartman <gregkh@...uxfoundation.org>
Cc:     Rob Springer <rspringer@...gle.com>,
        John Joseph <jnjoseph@...gle.com>,
        Ben Chan <benchan@...omium.org>, devel@...verdev.osuosl.org,
        Zhongze Hu <frankhu@...omium.org>,
        lkml <linux-kernel@...r.kernel.org>,
        Simon Que <sque@...omium.org>,
        Guenter Roeck <groeck@...omium.org>,
        Todd Poynor <toddpoynor@...gle.com>,
        Dmitry Torokhov <dtor@...omium.org>
Subject: Re: [PATCH 13/18] staging: gasket: gasket_enable_dev fixups

On Fri, Jul 13, 2018 at 11:39 PM, Greg Kroah-Hartman
<gregkh@...uxfoundation.org> wrote:
> On Fri, Jul 13, 2018 at 10:58:11PM -0700, Todd Poynor wrote:
>> From: Todd Poynor <toddpoynor@...gle.com>
>>
>> Remove unnecessary variable.
>>
>> Bail out if no physical device.
>>
>> Signed-off-by: Todd Poynor <toddpoynor@...gle.com>
>> ---
>>  drivers/staging/gasket/gasket_core.c | 19 ++++++-------------
>>  1 file changed, 6 insertions(+), 13 deletions(-)
>>
>> diff --git a/drivers/staging/gasket/gasket_core.c b/drivers/staging/gasket/gasket_core.c
>> index 65aa7cf454fb..f7d8f66e8746 100644
>> --- a/drivers/staging/gasket/gasket_core.c
>> +++ b/drivers/staging/gasket/gasket_core.c
>> @@ -915,8 +915,6 @@ static int gasket_enable_dev(
>>  {
>>       int tbl_idx;
>>       int ret;
>> -     bool has_dma_ops;
>> -     struct device *ddev;
>>       const struct gasket_driver_desc *driver_desc =
>>               internal_desc->driver_desc;
>>
>> @@ -934,26 +932,21 @@ static int gasket_enable_dev(
>>               return ret;
>>       }
>>
>> -     has_dma_ops = true;
>> +     if (!gasket_dev->pci_dev) {
>> +             gasket_log_error(gasket_dev,
>> +                              "%s: no physical device", __func__);
>> +             return -ENODEV;
>> +     }
>
> How can this ever be true?  I don't see where this can be removed to
> enable this error check to be hit.  What am I missing?

Agree, I'll split this into two patches for the two things it does,
and just remove the unnecessary check.  Thanks,

>
> thanks,
>
> greg k-h



-- 
Todd

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ