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>] [day] [month] [year] [list]
Date:   Thu, 10 Nov 2016 22:51:21 +0100 (CET)
From:   Julia Lawall <julia.lawall@...6.fr>
To:     Jean-Christophe Trotin <jean-christophe.trotin@...com>,
        Mauro Carvalho Chehab <mchehab@...nel.org>
cc:     linux-media@...r.kernel.org, linux-kernel@...r.kernel.org,
        Christophe JAILLET <christophe.jaillet@...adoo.fr>
Subject: question about hva_hw_probe

The function hva_hw_probe in the file
drivers/media/platform/sti/hva/hva-hw.c contains the following code:

        /* get memory for esram */
        esram = platform_get_resource(pdev, IORESOURCE_MEM, 1);
        if (IS_ERR_OR_NULL(esram)) {
                dev_err(dev, "%s     failed to get esram\n", HVA_PREFIX);
                return PTR_ERR(esram);
        }
        hva->esram_addr = esram->start;
        hva->esram_size = resource_size(esram);

platform_get_resource only returns NULL on failure, so the test of
IS_ERR_OR_NULL doesn't look appropriate.  Nor does the return value of
PTR_ERR(esram), which will be 0 on a NULL result.  But I wondered if it
was intended to have a call to devm_ioremap_resource between the
platform_get_resource and the IS_ERR_OR_NULL test (which should be just
IS_ERR; likewise for the call just above)?

thanks,
julia

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ