Skip to content

Commit

Permalink
drivers: char: Use PTR_RET function
Browse files Browse the repository at this point in the history
Used PTR_RET function instead of IS_ERR and PTR_ERR.
Patch found using coccinelle.

Signed-off-by: Alexandru Gheorghiu <gheorghiuandru@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
  • Loading branch information
Alexandru Gheorghiu authored and Greg Kroah-Hartman committed Mar 25, 2013
1 parent 2451a84 commit 275b5d2
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion drivers/char/tile-srom.c
Original file line number Diff line number Diff line change
Expand Up @@ -371,7 +371,7 @@ static int srom_setup_minor(struct srom_dev *srom, int index)

dev = device_create(srom_class, &platform_bus,
MKDEV(srom_major, index), srom, "%d", index);
return IS_ERR(dev) ? PTR_ERR(dev) : 0;
return PTR_RET(dev);
}

/** srom_init() - Initialize the driver's module. */
Expand Down

0 comments on commit 275b5d2

Please sign in to comment.