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: <20120508081549.GB18595@becoht-mvanga>
Date:	Tue, 8 May 2012 10:15:49 +0200
From:	Manohar Vanga <manohar.vanga@...n.ch>
To:	Samuel Iglesias Gonsalvez <siglesias@...lia.com>
CC:	Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
	<devel@...verdev.osuosl.org>, <linux-kernel@...r.kernel.org>,
	Dan Carpenter <dan.carpenter@...cle.com>
Subject: Re: [PATCH v3 2/3] Staging: ipack: added support for the TEWS
 TPCI-200 carrier board

Hey Samuel,

> +static void tpci200_uninstall(struct tpci200_board *tpci200)
> +{
> +	int i;
> +
> +	for (i = 0; i < TPCI200_NB_SLOT; i++) {
> +		if (tpci200->slots[i].dev == NULL)
> +			continue;
> +		else
> +			tpci200->slots[i].dev->driver->ops->remove(tpci200->slots[i].dev);

Check whether the function exists or you could have trouble :)
If you already added a check when registering to make sure this is always non-NULL then
ignore this. I would recommend wrapping this up in some function:

    void tpci_slot_remove(struct tpci_slot *slot)
    {
        if (slot->dev->driver->ops->remove)
        	slot->dev->driver->ops->remove(slot->dev);
    }

-- 
/manohar
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ