]> git.ipfire.org Git - thirdparty/linux.git/commitdiff
staging: kpc2000: remove unnecessary assertions in kpc_dma_transfer
authorAditya Pakki <pakki001@umn.edu>
Thu, 19 Dec 2019 17:21:11 +0000 (11:21 -0600)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 3 Jan 2020 10:04:57 +0000 (11:04 +0100)
In kpc_dma_transfer(), the assertion that priv is NULL and priv->ldev
is NULL, are never satisfied. The two callers of the function,
dereference the fields before the function is called. This patch
removes the two BUG_ON calls.

Signed-off-by: Aditya Pakki <pakki001@umn.edu>
Link: https://lore.kernel.org/r/20191219172118.17456-1-pakki001@umn.edu
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/staging/kpc2000/kpc_dma/fileops.c

index cb52bd9a6d2fd7fa5d7a66a83697062edde8981b..40525540dde666d559e9533f69af8837674cec97 100644 (file)
@@ -49,9 +49,7 @@ static int kpc_dma_transfer(struct dev_private_data *priv,
        u64 dma_addr;
        u64 user_ctl;
 
-       BUG_ON(priv == NULL);
        ldev = priv->ldev;
-       BUG_ON(ldev == NULL);
 
        acd = kzalloc(sizeof(*acd), GFP_KERNEL);
        if (!acd) {