mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-30 19:51:31 -04:00
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: Hirofumi Nakagawa <[email protected]> Acked-by: David S. Miller <[email protected]> Acked-by: Jeff Garzik <[email protected]> Cc: Paul Clements <[email protected]> Cc: Richard Purdie <[email protected]> Cc: Alessandro Zummo <[email protected]> Cc: David Brownell <[email protected]> Cc: James Bottomley <[email protected]> Cc: Michael Halcrow <[email protected]> Cc: Anton Altaparmakov <[email protected]> Cc: Al Viro <[email protected]> Cc: Carsten Otte <[email protected]> Cc: Patrick McHardy <[email protected]> Cc: Paul Mundt <[email protected]> Cc: Jaroslav Kysela <[email protected]> Cc: Takashi Iwai <[email protected]> Acked-by: Mike Frysinger <[email protected]> Signed-off-by: Andrew Morton <[email protected]> Signed-off-by: Linus Torvalds <[email protected]>
This commit is contained in:
parent
9a6f70bbed
commit
801678c5a3
17 changed files with 23 additions and 23 deletions
|
|
@ -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;
|
||||
|
|
|
|||
|
|
@ -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);
|
||||
|
|
|
|||
|
|
@ -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;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -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) {
|
||||
|
|
|
|||
|
|
@ -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 {
|
||||
|
|
|
|||
|
|
@ -419,7 +419,7 @@ static int __devinit bfin_rtc_probe(struct platform_device *pdev)
|
|||
return -ENOMEM;
|
||||
|
||||
rtc->rtc_dev = rtc_device_register(pdev->name, &pdev->dev, &bfin_rtc_ops, THIS_MODULE);
|
||||
if (unlikely(IS_ERR(rtc))) {
|
||||
if (IS_ERR(rtc)) {
|
||||
ret = PTR_ERR(rtc->rtc_dev);
|
||||
goto err;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1828,7 +1828,7 @@ void scsi_scan_host(struct Scsi_Host *shost)
|
|||
}
|
||||
|
||||
p = kthread_run(do_scan_async, data, "scsi_scan_%d", shost->host_no);
|
||||
if (unlikely(IS_ERR(p)))
|
||||
if (IS_ERR(p))
|
||||
do_scan_async(data);
|
||||
}
|
||||
EXPORT_SYMBOL(scsi_scan_host);
|
||||
|
|
|
|||
Loading…
Reference in a new issue