Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 801678c5 authored by Hirofumi Nakagawa's avatar Hirofumi Nakagawa Committed by Linus Torvalds
Browse files

Remove duplicated unlikely() in IS_ERR()



Some drivers have duplicated unlikely() macros.  IS_ERR() already has
unlikely() in itself.

This patch cleans up such pointless code.

Signed-off-by: default avatarHirofumi Nakagawa <hnakagawa@miraclelinux.com>
Acked-by: default avatarDavid S. Miller <davem@davemloft.net>
Acked-by: default avatarJeff Garzik <jeff@garzik.org>
Cc: Paul Clements <paul.clements@steeleye.com>
Cc: Richard Purdie <rpurdie@rpsys.net>
Cc: Alessandro Zummo <a.zummo@towertech.it>
Cc: David Brownell <david-b@pacbell.net>
Cc: James Bottomley <James.Bottomley@HansenPartnership.com>
Cc: Michael Halcrow <mhalcrow@us.ibm.com>
Cc: Anton Altaparmakov <aia21@cantab.net>
Cc: Al Viro <viro@zeniv.linux.org.uk>
Cc: Carsten Otte <cotte@de.ibm.com>
Cc: Patrick McHardy <kaber@trash.net>
Cc: Paul Mundt <lethal@linux-sh.org>
Cc: Jaroslav Kysela <perex@perex.cz>
Cc: Takashi Iwai <tiwai@suse.de>
Acked-by: default avatarMike Frysinger <vapier@gentoo.org>
Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
parent 9a6f70bb
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -339,7 +339,7 @@ static struct request *nbd_read_stat(struct nbd_device *lo)
	}

	req = nbd_find_request(lo, *(struct request **)reply.handle);
	if (unlikely(IS_ERR(req))) {
	if (IS_ERR(req)) {
		result = PTR_ERR(req);
		if (result != -ENOENT)
			goto harderror;
+1 −1
Original line number Diff line number Diff line
@@ -105,7 +105,7 @@ int led_classdev_register(struct device *parent, struct led_classdev *led_cdev)

	led_cdev->dev = device_create(leds_class, parent, 0, "%s",
					    led_cdev->name);
	if (unlikely(IS_ERR(led_cdev->dev)))
	if (IS_ERR(led_cdev->dev))
		return PTR_ERR(led_cdev->dev);

	dev_set_drvdata(led_cdev->dev, led_cdev);
+1 −1
Original line number Diff line number Diff line
@@ -371,7 +371,7 @@ static int i2o_block_prep_req_fn(struct request_queue *q, struct request *req)
	/* connect the i2o_block_request to the request */
	if (!req->special) {
		ireq = i2o_block_request_alloc();
		if (unlikely(IS_ERR(ireq))) {
		if (IS_ERR(ireq)) {
			osm_debug("unable to allocate i2o_block_request!\n");
			return BLKPREP_DEFER;
		}
+1 −1
Original line number Diff line number Diff line
@@ -2437,7 +2437,7 @@ static int myri10ge_sw_tso(struct sk_buff *skb, struct net_device *dev)
	int status;

	segs = skb_gso_segment(skb, dev->features & ~NETIF_F_TSO6);
	if (unlikely(IS_ERR(segs)))
	if (IS_ERR(segs))
		goto drop;

	while (segs) {
+1 −1
Original line number Diff line number Diff line
@@ -4361,7 +4361,7 @@ static int tg3_tso_bug(struct tg3 *tp, struct sk_buff *skb)
	}

	segs = skb_gso_segment(skb, tp->dev->features & ~NETIF_F_TSO);
	if (unlikely(IS_ERR(segs)))
	if (IS_ERR(segs))
		goto tg3_tso_bug_end;

	do {
Loading