lkml.org 
[lkml]   [2022]   [Feb]   [28]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    /
    Date
    From
    SubjectRe: [PATCH 3/6] treewide: fix incorrect use to determine if list is empty
    On Mon, Feb 28, 2022 at 12:08:19PM +0100, Jakob Koschel wrote:
    > The list iterator value will *always* be set by list_for_each_entry().
    > It is incorrect to assume that the iterator value will be NULL if the
    > list is empty.
    >
    > Instead of checking the pointer it should be checked if
    > the list is empty.
    > In acpi_get_pmu_hw_inf() instead of setting the pointer to NULL
    > on the break, it is set to the correct value and leaving it
    > NULL if no element was found.
    >
    > Signed-off-by: Jakob Koschel <jakobkoschel@gmail.com>
    > ---
    > arch/powerpc/sysdev/fsl_gtm.c | 4 ++--
    > drivers/media/pci/saa7134/saa7134-alsa.c | 4 ++--
    > drivers/perf/xgene_pmu.c | 13 +++++++------
    > 3 files changed, 11 insertions(+), 10 deletions(-)

    These are all bug fixes.

    1) Send them as 3 separate patches.
    2) Add Fixes tags.

    regards,
    dan carpenter

    \
     
     \ /
      Last update: 2022-02-28 12:41    [W:2.642 / U:0.212 seconds]
    ©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site