- isapnp-remove-pointless-check-of-type-against-0-in-isapnp_read_tag.patch removed from -mm tree

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



The patch titled
     isapnp: remove pointless check of 'type' against 0 in isapnp_read_tag()
has been removed from the -mm tree.  Its filename was
     isapnp-remove-pointless-check-of-type-against-0-in-isapnp_read_tag.patch

This patch was dropped because it was merged into mainline or a subsystem tree

------------------------------------------------------
Subject: isapnp: remove pointless check of 'type' against 0 in isapnp_read_tag()
From: Jesper Juhl <jesper.juhl@xxxxxxxxx>

In drivers/pnp/isapnp/core.c::isapnp_read_tag() there is a test of 'type'
being == 0 a bit down in the function.  That test doesn't make any sense. 
If 'type' could indeed be NULL, then the test happens way too late as we'd
already have tried to dereference the pointer earlier and looking at the
callers it also turns out that there is no way type can ever actually be
NULL.

So the test is completely pointless and should just be removed.

Signed-off-by: Jesper Juhl <jesper.juhl@xxxxxxxxx>
Signed-off-by: Andrew Morton <akpm@xxxxxxxxxxxxxxxxxxxx>
---

 drivers/pnp/isapnp/core.c |    2 --
 1 file changed, 2 deletions(-)

diff -puN drivers/pnp/isapnp/core.c~isapnp-remove-pointless-check-of-type-against-0-in-isapnp_read_tag drivers/pnp/isapnp/core.c
--- a/drivers/pnp/isapnp/core.c~isapnp-remove-pointless-check-of-type-against-0-in-isapnp_read_tag
+++ a/drivers/pnp/isapnp/core.c
@@ -370,8 +370,6 @@ static int __init isapnp_read_tag(unsign
 #if 0
 	printk(KERN_DEBUG "tag = 0x%x, type = 0x%x, size = %i\n", tag, *type, *size);
 #endif
-	if (type == 0)				/* wrong type */
-		return -1;
 	if (*type == 0xff && *size == 0xffff)	/* probably invalid data */
 		return -1;
 	return 0;
_

Patches currently in -mm which might be from jesper.juhl@xxxxxxxxx are

origin.patch
git-mtd.patch
remove-unneeded-test-of-task-in-dump_trace.patch
git-xfs.patch

-
To unsubscribe from this list: send the line "unsubscribe mm-commits" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Kernel Newbies FAQ]     [Kernel Archive]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [Bugtraq]     [Photo]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]

  Powered by Linux