From: Devendra Naga Date: Sun, 15 Jul 2012 13:22:02 +0000 (+0530) Subject: powerpc/BSR: cleanup the error path of bsr_init X-Git-Tag: v3.6-rc1~98^2~2 X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=8397c76a2c209997c7119bede2f26e51d8c786bc;p=pandora-kernel.git powerpc/BSR: cleanup the error path of bsr_init class_create if succeeded returns a pointer to the struct class, and if it fails, it returns a value enclosed by the pointer, which can be read by using PTR_ERR. Handle the error and return it. result is for error checking of the alloc_chrdev_region, instead ret can be used, and also if the alloc_chrdev_region fail, we are still returning -ENODEV, use ret and the error path will take care of returning of the ret. Signed-off-by: Devendra Naga Acked-by: Arnd Bergmann Signed-off-by: Greg Kroah-Hartman --- Reading git-diff-tree failed