X-Git-Url: http://pilppa.org/gitweb/gitweb.cgi?a=blobdiff_plain;f=drivers%2Fvideo%2Farkfb.c;h=38a1e8308c837d28d666e86a29b3097658020524;hb=950d442ad053e660538cdaa6efc0e060c2a65062;hp=5001bd4ef466331ba9c5498c3cd6fc7e9e4a8e21;hpb=96916090f488986a4ebb8e9ffa6a3b50881d5ccd;p=linux-2.6-omap-h63xx.git diff --git a/drivers/video/arkfb.c b/drivers/video/arkfb.c index 5001bd4ef46..38a1e8308c8 100644 --- a/drivers/video/arkfb.c +++ b/drivers/video/arkfb.c @@ -1126,11 +1126,8 @@ static int ark_pci_resume (struct pci_dev* dev) acquire_console_sem(); mutex_lock(&(par->open_lock)); - if (par->ref_count == 0) { - mutex_unlock(&(par->open_lock)); - release_console_sem(); - return 0; - } + if (par->ref_count == 0) + goto fail; pci_set_power_state(dev, PCI_D0); pci_restore_state(dev); @@ -1143,8 +1140,8 @@ static int ark_pci_resume (struct pci_dev* dev) arkfb_set_par(info); fb_set_suspend(info, 0); - mutex_unlock(&(par->open_lock)); fail: + mutex_unlock(&(par->open_lock)); release_console_sem(); return 0; }