]> git.proxmox.com Git - mirror_ubuntu-bionic-kernel.git/blobdiff - drivers/tty/hvc/hvsi_lib.c
Merge commit 'c104f1fa1ecf4ee0fc06e31b1f77630b2551be81' into stable/for-linus-3.4
[mirror_ubuntu-bionic-kernel.git] / drivers / tty / hvc / hvsi_lib.c
index bd9b09827b24991db437deb492e1b6f82a43ae26..6f4dd83d869533a3ff61b3e1b0d0c3d80a0f6c99 100644 (file)
@@ -183,7 +183,7 @@ int hvsilib_get_chars(struct hvsi_priv *pv, char *buf, int count)
        unsigned int tries, read = 0;
 
        if (WARN_ON(!pv))
-               return 0;
+               return -ENXIO;
 
        /* If we aren't open, don't do anything in order to avoid races
         * with connection establishment. The hvc core will call this
@@ -234,7 +234,7 @@ int hvsilib_put_chars(struct hvsi_priv *pv, const char *buf, int count)
        int rc, adjcount = min(count, HVSI_MAX_OUTGOING_DATA);
 
        if (WARN_ON(!pv))
-               return 0;
+               return -ENODEV;
 
        dp.hdr.type = VS_DATA_PACKET_HEADER;
        dp.hdr.len = adjcount + sizeof(struct hvsi_header);