Remove unused error variables in cdclose() and daclose().

This commit is contained in:
Alexander Motin 2012-06-20 18:35:36 +00:00
parent 5868be1e3c
commit 82887886a7
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=237336
2 changed files with 2 additions and 4 deletions

View File

@ -1041,7 +1041,6 @@ cdclose(struct disk *dp)
{
struct cam_periph *periph;
struct cd_softc *softc;
int error;
periph = (struct cam_periph *)dp->d_drv1;
if (periph == NULL)
@ -1050,7 +1049,7 @@ cdclose(struct disk *dp)
softc = (struct cd_softc *)periph->softc;
cam_periph_lock(periph);
if ((error = cam_periph_hold(periph, PRIBIO)) != 0) {
if (cam_periph_hold(periph, PRIBIO) != 0) {
cam_periph_unlock(periph);
cam_periph_release(periph);
return (0);

View File

@ -982,14 +982,13 @@ daclose(struct disk *dp)
{
struct cam_periph *periph;
struct da_softc *softc;
int error;
periph = (struct cam_periph *)dp->d_drv1;
if (periph == NULL)
return (0);
cam_periph_lock(periph);
if ((error = cam_periph_hold(periph, PRIBIO)) != 0) {
if (cam_periph_hold(periph, PRIBIO) != 0) {
cam_periph_unlock(periph);
cam_periph_release(periph);
return (0);